<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><div id="myscoll"></div><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>Bootstrap | XiaoFei🥝</title><meta name="keywords" content="Bootstrap"><meta name="author" content="XiaoFei🥝"><meta name="copyright" content="XiaoFei🥝"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="ffffff"><meta name="description" content="Bootstrap">
<meta property="og:type" content="article">
<meta property="og:title" content="Bootstrap">
<meta property="og:url" content="https://www.naste.top:1024/posts/d352c4d3.html">
<meta property="og:site_name" content="XiaoFei🥝">
<meta property="og:description" content="Bootstrap">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://www.naste.top:9000/webp/1515952743801.webp">
<meta property="article:published_time" content="2022-06-26T10:01:02.000Z">
<meta property="article:modified_time" content="2024-04-26T09:52:18.987Z">
<meta property="article:author" content="XiaoFei🥝">
<meta property="article:tag" content="Bootstrap">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://www.naste.top:9000/webp/1515952743801.webp"><link rel="shortcut icon" href="/"><link rel="canonical" href="https://www.naste.top:1024/posts/d352c4d3"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.staticfile.org/fancyapps-ui/4.0.31/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.json","preload":true,"languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: {"limitDay":365,"position":"top","messagePrev":"It has been","messageNext":"days since the last update, the content of the article may be outdated."},
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":230},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: true,
    post: true
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdnjs.cloudflare.com/ajax/libs/flickr-justified-gallery/2.1.2/fjGallery.min.js',
      css: 'https://cdnjs.cloudflare.com/ajax/libs/flickr-justified-gallery/2.1.2/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Bootstrap',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2024-04-26 17:52:18'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', 'ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="https://cdn1.tianli0.top/npm/element-ui@2.15.6/packages/theme-chalk/lib/index.css"><style id="themeColor"></style><style id="rightSide"></style><style id="transPercent"></style><style id="blurNum"></style><style id="settingStyle"></style><span id="fps"></span><style id="defineBg"></style><style id="menu_shadow"></style><svg aria-hidden="true" style="position:absolute; overflow:hidden; width:0; height:0"><symbol id="icon-sun" viewBox="0 0 1024 1024"><path d="M960 512l-128 128v192h-192l-128 128-128-128H192v-192l-128-128 128-128V192h192l128-128 128 128h192v192z" fill="#FFD878" p-id="8420"></path><path d="M736 512a224 224 0 1 0-448 0 224 224 0 1 0 448 0z" fill="#FFE4A9" p-id="8421"></path><path d="M512 109.248L626.752 224H800v173.248L914.752 512 800 626.752V800h-173.248L512 914.752 397.248 800H224v-173.248L109.248 512 224 397.248V224h173.248L512 109.248M512 64l-128 128H192v192l-128 128 128 128v192h192l128 128 128-128h192v-192l128-128-128-128V192h-192l-128-128z" fill="#4D5152" p-id="8422"></path><path d="M512 320c105.888 0 192 86.112 192 192s-86.112 192-192 192-192-86.112-192-192 86.112-192 192-192m0-32a224 224 0 1 0 0 448 224 224 0 0 0 0-448z" fill="#4D5152" p-id="8423"></path></symbol><symbol id="icon-moon" viewBox="0 0 1024 1024"><path d="M611.370667 167.082667a445.013333 445.013333 0 0 1-38.4 161.834666 477.824 477.824 0 0 1-244.736 244.394667 445.141333 445.141333 0 0 1-161.109334 38.058667 85.077333 85.077333 0 0 0-65.066666 135.722666A462.08 462.08 0 1 0 747.093333 102.058667a85.077333 85.077333 0 0 0-135.722666 65.024z" fill="#FFB531" p-id="11345"></path><path d="M329.728 274.133333l35.157333-35.157333a21.333333 21.333333 0 1 0-30.165333-30.165333l-35.157333 35.157333-35.114667-35.157333a21.333333 21.333333 0 0 0-30.165333 30.165333l35.114666 35.157333-35.114666 35.157334a21.333333 21.333333 0 1 0 30.165333 30.165333l35.114667-35.157333 35.157333 35.157333a21.333333 21.333333 0 1 0 30.165333-30.165333z" fill="#030835" p-id="11346"></path></symbol></svg><!-- hexo injector head_end start --><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiperstyle.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/font-awesome-animation.min.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/tag_plugins.css" media="defer" onload="this.media='all'"><script src="https://npm.elemecdn.com/hexo-butterfly-tag-plugins-plus@latest/lib/assets/carousel-touch.js"></script><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/animate.min.css" media="print" onload="this.media='screen'"><link rel="stylesheet" href="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.css" media="print" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"><link rel="alternate" href="/atom.xml" title="XiaoFei🥝" type="application/atom+xml">
</head><body><div id="loading-box" onclick="document.getElementById(&quot;loading-box&quot;).classList.add(&quot;loaded&quot;)"><div class="loading-bg"><div class="loading-img"></div><div class="loading-image-dot"></div></div></div><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="https://www.naste.top:9000/images/cat.jpg" onerror="onerror=null;src='/assets/r1.jpg'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">149</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">99</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">46</div></a></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-home"></use></svg><span class="menu_word" style="font-size:17px"> 首页</span></a></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon--article"></use></svg><span class="menu_word" style="font-size:17px"> 文章</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-guidang1">                   </use></svg><span class="menu_word" style="font-size:17px"> 归档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-sekuaibiaoqian">                   </use></svg><span class="menu_word" style="font-size:17px"> 标签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-fenlei">                   </use></svg><span class="menu_word" style="font-size:17px"> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-pinweishenghuo"></use></svg><span class="menu_word" style="font-size:17px"> 休闲</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/life/music/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-yinle">                   </use></svg><span class="menu_word" style="font-size:17px"> 八音盒</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/life/movies/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-dianying1">                   </use></svg><span class="menu_word" style="font-size:17px"> 影院</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/life/games/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-youxishoubing">                   </use></svg><span class="menu_word" style="font-size:17px"> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-xiangzi"></use></svg><span class="menu_word" style="font-size:17px"> 八宝箱</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/box/gallery/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-tubiaozhizuomoban">                   </use></svg><span class="menu_word" style="font-size:17px"> 画廊</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/box/animation/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-nvwumao">                   </use></svg><span class="menu_word" style="font-size:17px"> 动画</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/box/nav/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-zhifengche">                   </use></svg><span class="menu_word" style="font-size:17px"> 网址导航</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-shejiaoxinxi"></use></svg><span class="menu_word" style="font-size:17px"> 社交</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/social/fcircle/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-pengyouquan">                   </use></svg><span class="menu_word" style="font-size:17px"> 朋友圈</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/comments/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-liuyan">                   </use></svg><span class="menu_word" style="font-size:17px"> 留言板</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/social/link/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-lianjie">                   </use></svg><span class="menu_word" style="font-size:17px"> 友人帐</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-wangye"></use></svg><span class="menu_word" style="font-size:17px"> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/site/census/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon--tongjibiao">                   </use></svg><span class="menu_word" style="font-size:17px"> 网站统计</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/site/echarts/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-shujutongji1">                   </use></svg><span class="menu_word" style="font-size:17px"> 文章统计</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/site/time/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-xianxingshalou">                   </use></svg><span class="menu_word" style="font-size:17px"> 旧时光</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-maoliang"></use></svg><span class="menu_word" style="font-size:17px"> 个人</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/personal/bb/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-qunliaotian">                   </use></svg><span class="menu_word" style="font-size:17px"> 唠叨</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/personal/love/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-love-sign">                   </use></svg><span class="menu_word" style="font-size:17px"> 恋爱小屋</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/personal/about/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-paperplane">                   </use></svg><span class="menu_word" style="font-size:17px"> 关于</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/encryption/%E6%9C%BA%E5%9C%BA/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-paperplane">                   </use></svg><span class="menu_word" style="font-size:17px"> 机场</span></a></li></ul></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">XiaoFei🥝</a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page faa-parent animated-hover" href="/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-home"></use></svg><span class="menu_word" style="font-size:17px"> 首页</span></a></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon--article"></use></svg><span class="menu_word" style="font-size:17px"> 文章</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/archives/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-guidang1">                   </use></svg><span class="menu_word" style="font-size:17px"> 归档</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/tags/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-sekuaibiaoqian">                   </use></svg><span class="menu_word" style="font-size:17px"> 标签</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/categories/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-fenlei">                   </use></svg><span class="menu_word" style="font-size:17px"> 分类</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-pinweishenghuo"></use></svg><span class="menu_word" style="font-size:17px"> 休闲</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/life/music/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-yinle">                   </use></svg><span class="menu_word" style="font-size:17px"> 八音盒</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/life/movies/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-dianying1">                   </use></svg><span class="menu_word" style="font-size:17px"> 影院</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/life/games/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-youxishoubing">                   </use></svg><span class="menu_word" style="font-size:17px"> 游戏</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-xiangzi"></use></svg><span class="menu_word" style="font-size:17px"> 八宝箱</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/box/gallery/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-tubiaozhizuomoban">                   </use></svg><span class="menu_word" style="font-size:17px"> 画廊</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/box/animation/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-nvwumao">                   </use></svg><span class="menu_word" style="font-size:17px"> 动画</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/box/nav/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-zhifengche">                   </use></svg><span class="menu_word" style="font-size:17px"> 网址导航</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-shejiaoxinxi"></use></svg><span class="menu_word" style="font-size:17px"> 社交</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/social/fcircle/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-pengyouquan">                   </use></svg><span class="menu_word" style="font-size:17px"> 朋友圈</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/comments/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-liuyan">                   </use></svg><span class="menu_word" style="font-size:17px"> 留言板</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/social/link/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-lianjie">                   </use></svg><span class="menu_word" style="font-size:17px"> 友人帐</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-wangye"></use></svg><span class="menu_word" style="font-size:17px"> 网站</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/site/census/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon--tongjibiao">                   </use></svg><span class="menu_word" style="font-size:17px"> 网站统计</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/site/echarts/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-shujutongji1">                   </use></svg><span class="menu_word" style="font-size:17px"> 文章统计</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/site/time/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-xianxingshalou">                   </use></svg><span class="menu_word" style="font-size:17px"> 旧时光</span></a></li></ul></div><div class="menus_item"><a class="site-page group faa-parent animated-hover hide" href="javascript:void(0);"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-maoliang"></use></svg><span class="menu_word" style="font-size:17px"> 个人</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child faa-parent animated-hover" href="/personal/bb/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-qunliaotian">                   </use></svg><span class="menu_word" style="font-size:17px"> 唠叨</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/personal/love/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-love-sign">                   </use></svg><span class="menu_word" style="font-size:17px"> 恋爱小屋</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/personal/about/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-paperplane">                   </use></svg><span class="menu_word" style="font-size:17px"> 关于</span></a></li><li><a class="site-page child faa-parent animated-hover" href="/encryption/%E6%9C%BA%E5%9C%BA/"><svg class="menu_icon faa-tada" aria-hidden="true" style="width:1.30em;height:1.30em;vertical-align:-0.15em;fill:currentColor;overflow:hidden;"><use xlink:href="#icon-paperplane">                   </use></svg><span class="menu_word" style="font-size:17px"> 机场</span></a></li></ul></div></div><center id="name-container"><a id="page-name" href="javascript:scrollToTop()">PAGE_NAME</a></center><div id="nav-right"><div id="search-button"><a class="search faa-parent animated-hover" title="检索站内任何你想要的信息"><svg class="faa-tada icon" style="height:24px;width:24px;fill:currentColor;position:relative;top:6px" aria-hidden="true"><use xlink:href="#icon-valentine_-search-love-find-heart"></use></svg><span> 搜索</span></a></div><a class="meihua faa-parent animated-hover" onclick="toggleWinbox()" title="美化设置-自定义你的风格" id="meihua-button"><svg class="faa-tada icon" style="height:26px;width:26px;fill:currentColor;position:relative;top:8px" aria-hidden="true"><use xlink:href="#icon-tupian1"></use></svg></a><a class="sun_moon faa-parent animated-hover" onclick="switchNightMode()" title="浅色和深色模式转换" id="nightmode-button"><svg class="faa-tada" style="height:25px;width:25px;fill:currentColor;position:relative;top:7px" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon">       </use></svg></a><div id="toggle-menu"><a><i class="fas fa-bars fa-fw"></i></a></div></div></div></nav><div id="post-info"><h1 class="post-title">Bootstrap</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><svg class="meta_icon post-meta-icon" style="width:30px;height:30px;position:relative;top:10px"><use xlink:href="#icon-rili"></use></svg><span class="post-meta-label">发表于 </span><time class="post-meta-date-created" datetime="2022-06-26T10:01:02.000Z" title="发表于 2022-06-26 18:01:02">2022-06-26</time><span class="post-meta-separator">|</span><svg class="meta_icon post-meta-icon" style="width:18px;height:18px;position:relative;top:5px"><use xlink:href="#icon-gengxin1"></use></svg><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2024-04-26T09:52:18.987Z" title="更新于 2024-04-26 17:52:18">2024-04-26</time></span><span class="post-meta-categories"><span class="post-meta-separator">|</span><svg class="meta_icon post-meta-icon" style="width:18px;height:18px;position:relative;top:5px"><use xlink:href="#icon-biaoqian"></use></svg><a class="post-meta-categories" href="/categories/%E5%89%8D%E7%AB%AF/">前端</a><i class="fas fa-angle-right post-meta-separator"></i><svg class="meta_icon post-meta-icon" style="width:18px;height:18px;position:relative;top:5px"><use xlink:href="#icon-biaoqian"></use></svg><a class="post-meta-categories" href="/categories/%E5%89%8D%E7%AB%AF/%E6%A0%B7%E5%BC%8F/">样式</a></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-wordcount"><svg class="meta_icon post-meta-icon" style="width:25px;height:25px;position:relative;top:8px"><use xlink:href="#icon-charuword"></use></svg><span class="post-meta-label">字数总计:</span><span class="word-count">7785</span><span class="post-meta-separator">|</span><svg class="meta_icon post-meta-icon" style="width:20px;height:20px;position:relative;top:5px"><use xlink:href="#icon-shizhong"></use></svg><span class="post-meta-label">阅读时长:</span><span>36分钟</span></span><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="Bootstrap"><svg class="meta_icon post-meta-icon" style="width:25px;height:25px;position:relative;top:5px"><use xlink:href="#icon-eye"></use></svg><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div><section class="main-hero-waves-area waves-area"><svg class="waves-svg" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M -160 44 c 30 0 58 -18 88 -18 s 58 18 88 18 s 58 -18 88 -18 s 58 18 88 18 v 44 h -352 Z"></path></defs><g class="parallax"><use href="#gentle-wave" x="48" y="0"></use><use href="#gentle-wave" x="48" y="3"></use><use href="#gentle-wave" x="48" y="5"></use><use href="#gentle-wave" x="48" y="7"></use></g></svg></section></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h1 id="Bootstrap"><a href="#Bootstrap" class="headerlink" title="Bootstrap"></a>Bootstrap</h1><h2 id="布局容器和栅格网格系统"><a href="#布局容器和栅格网格系统" class="headerlink" title="布局容器和栅格网格系统"></a>布局容器和栅格网格系统</h2><h3 id="1、布局容器"><a href="#1、布局容器" class="headerlink" title="1、布局容器"></a>1、布局容器</h3><p>1、container类：用于固定并支持响应式布局的容器（使用比较多）</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--1、container类：用于固定并支持响应式布局的容器--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span> <span class="attr">style</span>=<span class="string">&quot;height: 200px;background-color: deepskyblue; text-align: center&quot;</span>&gt;</span></span><br><span class="line">    1、container类：用于固定并支持响应式布局的容器</span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2、container-fluid类：用于100%宽度，占据全部视口（viewport）的容器</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--2、container-fluid类：用于100%宽度，占据全部视口（viewport）的容器--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container-fluid&quot;</span> <span class="attr">style</span>=<span class="string">&quot;height: 200px;background-color: deepskyblue; text-align: center&quot;</span>&gt;</span></span><br><span class="line">    2、container-fluid类：用于100%宽度，占据全部视口（viewport）的容器</span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="2、栅格网格系统"><a href="#2、栅格网格系统" class="headerlink" title="2、栅格网格系统"></a>2、栅格网格系统</h3><p>1、 Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统，随着屏幕或视口（viewport）尺寸的增加，系统会自动分为最多12列。栅格系统用于通过一系列的行（row）与列（column）的组合来创建页面布局，你的内容就可以放入这些创建好的布局中。</p>
<p>2、网格系统的实现原理非常简单，仅仅通过定义容器大小，平分12份（也有平分24份或32份），但12份是最常见的，再调整内外边距，最后结合媒体查询，就制作出了强大的响应式网格系统。Bootstrap框架中的网格系统就是将容器平分成12份</p>
<p><img src= "" data-lazy-src="https://www.naste.top:9000/webp/%E6%A0%85%E6%A0%BC%E7%BD%91%E6%A0%BC%E7%B3%BB%E7%BB%9F.webp" alt="image-20210325144314804"></p>
<p>3、注意: 网格系统必须使用到css</p>
<p>4、 container、row 、xs (xsmall phones)，sm (small tablets)，md (middle desktops)，lg (larger desktops) 即: 超小屏(自动)，小屏(750px)，中屏(970px)和大屏(1170px)</p>
<p>5、 数据行(.row)必须包含在容器（.container）中，以便为其赋予合适的对齐方式和内距(padding)。</p>
<p>6、 在行(.row)中可以添加列(.column), 只有列（column）才可以作为行容器(.row)的直接子元素，但列数之和不能超过平分的总列数，比如12。如果大于12,则自动换到下一行。</p>
<p>7、 具体内容应当放置在列容器（column）之内</p>
<h4 id="栅格参数"><a href="#栅格参数" class="headerlink" title="栅格参数"></a>栅格参数</h4><p><img src= "" data-lazy-src="https://www.naste.top:9000/webp/%E6%A0%85%E6%A0%BC%E5%8F%82%E6%95%B0.webp" alt="image-20210325150316555"></p>
<h4 id="列组合"><a href="#列组合" class="headerlink" title="列组合"></a>列组合</h4><p> 列组合简单理解就是更改数字来合并列（原则：列总和数不能超12，大于12,则自动换到下一行。），有点类似于表格的colspan属性。</p>
<p><strong>一个row里面的列总数不能大于12</strong></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--列组合</span></span><br><span class="line"><span class="comment">col-xs-数值：超小屏幕 手机（&lt;768px）</span></span><br><span class="line"><span class="comment">col-sm-数值：小屏幕 平板（≥768px）</span></span><br><span class="line"><span class="comment">col-md-数值：中等屏幕 桌面显示器（≥992px）（现在电脑开发使用该列元素）</span></span><br><span class="line"><span class="comment">col-lg-数值：大屏幕 大桌面显示器（≥1200px）</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span> <span class="attr">lang</span>=<span class="string">&quot;en&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line">         <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;UTF-8&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">http-equiv</span>=<span class="string">&quot;X-UA-Compatible&quot;</span> <span class="attr">content</span>=<span class="string">&quot;ie=edge&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">name</span>=<span class="string">&quot;viewport&quot;</span> <span class="attr">content</span>=<span class="string">&quot;width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>栅格网格系统<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--Bootstrap的css--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;../resource/bootstrap/css/bootstrap.css&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--自定义的一些css--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">style</span>&gt;</span><span class="language-css"></span></span><br><span class="line"><span class="language-css">            <span class="selector-tag">div</span> &#123;</span></span><br><span class="line"><span class="language-css">                <span class="attribute">background-color</span> : white;</span></span><br><span class="line"><span class="language-css">                <span class="attribute">border</span>           : <span class="number">1px</span> solid deepskyblue;</span></span><br><span class="line"><span class="language-css">                <span class="attribute">text-align</span>       : center;</span></span><br><span class="line"><span class="language-css">            &#125;</span></span><br><span class="line"><span class="language-css">        </span><span class="tag">&lt;/<span class="name">style</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--布局容器--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">            <span class="comment">&lt;!--行元素--&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">                <span class="comment">&lt;!--列元素</span></span><br><span class="line"><span class="comment">                col-xs-数值：超小屏幕 手机（&lt;768px）</span></span><br><span class="line"><span class="comment">                col-sm-数值：小屏幕 平板（≥768px）</span></span><br><span class="line"><span class="comment">                col-md-数值：中等屏幕 桌面显示器（≥992px）（现在电脑开发使用该列元素）</span></span><br><span class="line"><span class="comment">                col-lg-数值：大屏幕 大桌面显示器（≥1200px）</span></span><br><span class="line"><span class="comment">                --&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span>4列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span>8列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="列偏移"><a href="#列偏移" class="headerlink" title="列偏移"></a>列偏移</h4><p> 如果我们不希望相邻的两个列紧靠在一起，但又不想使用margin或者其他的技术手段来。这个时候就可以使用列偏移（offset）功能来实现。使用列偏移也非常简单，只需要在列元素上添加类名”col-md-offset-*”(其中星号代表要偏移的列组合数)，那么具有这个类名的列就会向右偏移。例如，你在列元素上添加”col-md-offset-8”，表示该列向右移动8个列的宽度(要保证列与偏移列的总数不超过12，不然会致列断行|换行显示)。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- </span></span><br><span class="line"><span class="comment">列偏移：使每一列的产生距离，在每一列前面偏移</span></span><br><span class="line"><span class="comment">使用列偏移：注意点一个row里面的总数 = col-md-数值 + col-xs-offset-数值</span></span><br><span class="line"><span class="comment">col-xs-offset-列偏移的数量</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span>	</span><br><span class="line">    	<span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">        	<span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-2&quot;</span>&gt;</span>2列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        	<span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 col-xs-offset-1&quot;</span>&gt;</span>4列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        	<span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 col-xs-offset-1&quot;</span>&gt;</span>4列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">	    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="列排序"><a href="#列排序" class="headerlink" title="列排序"></a>列排序</h4><p> 列排序其实就是改变列的方向，就是改变左右浮动，并且设置浮动的距离。在Bootstrap框架的网格系统中是通过添加类名 col-md-push-<em> 和 col-md-pull-</em> (其中星号代表移动的列组合数)。往前pull，往后push。</p>
<p>列排序就算超过了父元素的宽度也不会换行，他会直接超出父元素的范围</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">h2</span>&gt;</span>列排序<span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-2 &quot;</span>&gt;</span>2列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 向左浮动 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 col-lg-pull-1&quot;</span>&gt;</span>4列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 向右浮动 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 col-lg-push-2&quot;</span>&gt;</span>4列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="列嵌套"><a href="#列嵌套" class="headerlink" title="列嵌套"></a>列嵌套</h4><p> Bootstrap框架的网格系统还支持列的嵌套。你可以在一个列中添加一个或者多个行（row）容器，然后在这个行容器中插入列.</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span>   </span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">h2</span>&gt;</span>列嵌套<span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-6 &quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span>4<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 &quot;</span>&gt;</span>4<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4 &quot;</span>&gt;</span>4<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-6 &quot;</span>&gt;</span>6列<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h2 id="常用样式"><a href="#常用样式" class="headerlink" title="常用样式"></a>常用样式</h2><h3 id="排版"><a href="#排版" class="headerlink" title="排版"></a>排版</h3><h4 id="标题"><a href="#标题" class="headerlink" title="标题"></a>标题</h4><p>Bootstrap和普通的HTML页面一样，定义标题都是使用标签，定义标题标签都是使用<h1>—-<h6>，只不过Bootstrap覆盖了默认的样式，使其在所有浏览器中的效果都一样</p>
<p>为了让非标题标签的和标题标签使用相同的样式，还特意定义了h1—-h6里六个类名，同时使用乐意紧跟着一行小的副标题<small></small>或使用 .small</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">h1</span>&gt;</span>标题1</span><br><span class="line">    <span class="tag">&lt;<span class="name">small</span>&gt;</span>副标题<span class="tag">&lt;/<span class="name">small</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">h1</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">h2</span>&gt;</span>标题2</span><br><span class="line">    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;small&quot;</span>&gt;</span>我是副标题，加了small类属性，有了副标题的效果<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;h1&quot;</span>&gt;</span>我是div，使用了Bootstrap有了h1标签的效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="段落"><a href="#段落" class="headerlink" title="段落"></a>段落</h4><p> 段落是排版中另一个重要元素之一。</p>
<p>通过.lead 来突出强调内容(其作用就是增大文本字号，加粗文本，而且对行高和margin也做相应的处理。可以使用以下标签给文本做突出样式处理：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">        <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">		使用lead</span></span><br><span class="line"><span class="comment">         小号字： &lt;small&gt;</span></span><br><span class="line"><span class="comment">         加粗： &lt;b&gt; &lt;strong&gt;</span></span><br><span class="line"><span class="comment">         斜体：&lt;i&gt;  &lt;em&gt;</span></span><br><span class="line"><span class="comment">        --&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;lead&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">b</span>&gt;</span>通过.lead<span class="tag">&lt;/<span class="name">b</span>&gt;</span> </span><br><span class="line">    来突出强调内容( </span><br><span class="line">    <span class="tag">&lt;<span class="name">small</span>&gt;</span>其作用就是增大文本字号，<span class="tag">&lt;/<span class="name">small</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">strong</span>&gt;</span>加粗文本<span class="tag">&lt;/<span class="name">strong</span>&gt;</span>，</span><br><span class="line">    <span class="tag">&lt;<span class="name">i</span>&gt;</span>而且<span class="tag">&lt;/<span class="name">i</span>&gt;</span></span><br><span class="line">	对行高和</span><br><span class="line">    <span class="tag">&lt;<span class="name">em</span>&gt;</span>margin<span class="tag">&lt;/<span class="name">em</span>&gt;</span></span><br><span class="line">    也做相应的处理。可以使用以下标签给文本做突出样式处理：</span><br><span class="line"><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="强调"><a href="#强调" class="headerlink" title="强调"></a>强调</h4><p> 定义了一套类名，这里称其为强调类名，这些强调类都是<strong>通过字体颜色</strong>来表示强调，具本说明如下：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">.text-muted：提示，使用浅灰色（#999）</span></span><br><span class="line"><span class="comment">.text-primary：主要，使用蓝色（#428bca）</span></span><br><span class="line"><span class="comment">.text-success：成功，使用浅绿色(#3c763d)</span></span><br><span class="line"><span class="comment">.text-info：通知信息，使用浅蓝色（#31708f）</span></span><br><span class="line"><span class="comment">.text-warning：警告，使用黄色（#8a6d3b）</span></span><br><span class="line"><span class="comment">.text-danger：危险，使用褐色（#a94442）</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-muted&quot;</span>&gt;</span>提示效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-primary&quot;</span>&gt;</span>主要效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-success&quot;</span>&gt;</span>成功效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-info&quot;</span>&gt;</span>信息效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-warning&quot;</span>&gt;</span>警告效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;text-danger&quot;</span>&gt;</span>危险效果<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="对齐效果"><a href="#对齐效果" class="headerlink" title="对齐效果"></a>对齐效果</h4><p>1、 在CSS中常常使用text-align来实现文本的对齐风格的设置。</p>
<p> 2、为了简化操作，方便使用，Bootstrap通过定义四个类名来控制文本的对齐风格：.text-left：左对齐 .text-center：居中对齐 .text-right：右对齐 .text-justify：两端对齐。</p>
<p>3、 其中主要有四种风格：</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">左对齐，取值：text-left ;</span></span><br><span class="line"><span class="comment">居中对齐，取值：text-center;</span></span><br><span class="line"><span class="comment">右对齐，取值：text-right ;</span></span><br><span class="line"><span class="comment">两端对齐，取值：text-justify。</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;text-left&quot;</span>&gt;</span>我居左<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;text-center&quot;</span>&gt;</span>我居中<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;text-right&quot;</span>&gt;</span>我居右<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">p</span> <span class="attr">class</span>=<span class="string">&quot;text-justify&quot;</span>&gt;</span></span><br><span class="line">    网格系统的实现原理非常简单，仅仅是通过定义容器大小，平分12份(也有平分成24份或32份，但12份是最常见的)，</span><br><span class="line">    再调整内外边距，最后结合媒体查询，就制作出了强大的响应式网格系统。Bootstrap框架中的网格系统就是将容器平分成12份</span><br><span class="line"><span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="列表"><a href="#列表" class="headerlink" title="列表"></a>列表</h4><p>在HTML中，列表有如下三种</p>
<ul>
<li>无序列表：（ <ul> <li> ... </li> </ul> ）</li>
<li>有序列表：（ <ol> <li> ... </li> </ol> ）</li>
<li>定义列表：（ <dl> <dt> ... </dt>  <dd> ... </dd> </dl> ）</li>
</ul>
<p>==去点列表==</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;list-unstyled&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span>无序项目列表一<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>无序项目列表二<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>==内联列表==</p>
<p> class=“list-inline”，把垂直列表换成水平列表，而且去掉项目符号（编号），保持水平显示。也可以说内联列表就是为制作水平导航而生。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;list-inline&quot;</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>首页<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>java学院<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span>在线课堂<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>==定义列表==</p>
<p> 在原有的基础加入了一些样式，使用样式 class=“dl-horizontal” 制作水平定义列表 : 当标题宽度超过160px时，将会显示三个省略号。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">dl</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>HTML<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>超文本标记语言<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dt</span>&gt;</span>CSS<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">dd</span>&gt;</span>层叠样式表是一种样式表语言<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">dl</span> <span class="attr">class</span>=<span class="string">&quot;dl-horizontal&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dt</span>&gt;</span>HTML 超文本标记语言<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dd</span>&gt;</span>HTML称为超文本标记语言，是一种标识性的语言。<span class="tag">&lt;/<span class="name">dd</span>&gt;</span>		   </span><br><span class="line">    <span class="tag">&lt;<span class="name">dt</span>&gt;</span>测试标题不能超过160px的宽度,否则2个点<span class="tag">&lt;/<span class="name">dt</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">dd</span>&gt;</span>我在写一个水平定义列表的效果，我在写一个水平定义列表的效果。<span class="tag">&lt;/<span class="name">dd</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">dl</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="代码"><a href="#代码" class="headerlink" title="代码"></a>代码</h4><p> 一般在个人博客上使用的较为频繁，用于显示代码的风格。在Bootstrap主要提供了三种代码风格：</p>
<p>（1）使用<code>&lt;code&gt;&lt;/code&gt;</code>来显示单行内联代码</p>
<p>（2）使用<code>&lt;pre&gt;&lt;/pre&gt;</code>来显示多行代码</p>
<p>​            样式： 样式：pre-scrollable (height,max-height高度固定,为340px,超过存在滚动条)</p>
<p>（3）使用<code>&lt;kbd&gt;&lt;/kbd&gt;</code>来显示用户输入代码,如快捷键</p>
<p>==单行代码==</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"> <span class="comment">&lt;!--单行代码--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">code</span>&gt;</span>public void main()&#123; ... &#125;<span class="tag">&lt;/<span class="name">code</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>==多行代码块==</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br></pre></td><td class="code"><pre><span class="line">        <span class="comment">&lt;!--多行代码--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">pre</span>&gt;</span></span><br><span class="line">public String testFunction() &#123;</span><br><span class="line">    System.out.println(&quot;控制器中的方法执行了&quot;);</span><br><span class="line">    return &quot;hello&quot;;</span><br><span class="line">&#125;</span><br><span class="line">        <span class="tag">&lt;/<span class="name">pre</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">            显示html标签的代码需要适应字符实体</span></span><br><span class="line"><span class="comment">            小于号（&lt;）要使用硬编码“&amp;lt;”来替代，大于号(&gt;)使用“&amp;gt;”来替代</span></span><br><span class="line"><span class="comment">        --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">pre</span>&gt;</span></span><br><span class="line">			<span class="symbol">&amp;lt;</span>ul<span class="symbol">&amp;gt;</span></span><br><span class="line">				<span class="symbol">&amp;lt;</span>li<span class="symbol">&amp;gt;</span>测试实体符<span class="symbol">&amp;lt;</span>/li<span class="symbol">&amp;gt;</span></span><br><span class="line">			<span class="symbol">&amp;lt;</span>/ul<span class="symbol">&amp;gt;</span></span><br><span class="line">		<span class="tag">&lt;/<span class="name">pre</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!-- 当高度超过，会存在滚动条 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">pre</span> <span class="attr">class</span>=<span class="string">&quot;pre-scrollable&quot;</span>&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">				...........<span class="tag">&lt;<span class="name">br</span>/&gt;</span></span><br><span class="line">		<span class="tag">&lt;/<span class="name">pre</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>==快捷键==</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--显示高亮词--&gt;</span></span><br><span class="line">保存使用：<span class="tag">&lt;<span class="name">kbd</span>&gt;</span>ctrl<span class="tag">&lt;/<span class="name">kbd</span>&gt;</span>+<span class="tag">&lt;<span class="name">kbd</span>&gt;</span>s<span class="tag">&lt;/<span class="name">kbd</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="表格"><a href="#表格" class="headerlink" title="表格"></a>表格</h4><p>==表格样式==</p>
<p> Bootstrap为表格提供了1种基础样式和4种附加样式以及1个支持响应式的表格。在使用Bootstrap的表格过程中，只需要添加对应的类名就可以得到不同的表格风格：</p>
<p>==基础样式==</p>
<p>1、基础表格</p>
<p>==附加样式==</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">table：</span></span><br><span class="line"><span class="comment">table-striped：斑马线表格</span></span><br><span class="line"><span class="comment">table-bordered：带边框的表格</span></span><br><span class="line"><span class="comment">table-hover：鼠标悬停高亮的表格</span></span><br><span class="line"><span class="comment">table-condensed：紧凑型表格，单元格没内距或者内距较其他表格的内距小</span></span><br><span class="line"><span class="comment">--&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">table</span> <span class="attr">class</span>=<span class="string">&quot;table table-striped table-bordered table-hover table-condensed&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>==<code>&lt;tr&gt;、&lt;th&gt;、&lt;td&gt;</code>样式==</p>
<p> 提供了五种不同的类名，每种类名控制了行的不同背景颜色</p>
<p><img src= "" data-lazy-src="https://www.naste.top:9000/webp/%E8%A1%A8%E6%A0%BC%E7%9A%84%E6%A0%B7%E5%BC%8F.webp" alt="image-20210325202025414"></p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">table</span> <span class="attr">class</span>=<span class="string">&quot;table table-striped table-bordered table-hover table-condensed&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">tr</span> <span class="attr">class</span>=<span class="string">&quot;active&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">th</span> &gt;</span>JavaSE<span class="tag">&lt;/<span class="name">th</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">th</span>&gt;</span>数据库<span class="tag">&lt;/<span class="name">th</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">th</span>&gt;</span>JavaScript<span class="tag">&lt;/<span class="name">th</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">tr</span> <span class="attr">class</span>=<span class="string">&quot;success&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>面向对象<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>oracle<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>json<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">tr</span> <span class="attr">class</span>=<span class="string">&quot;info&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>数组<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>mysql<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>ajax<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">tr</span> <span class="attr">class</span>=<span class="string">&quot;warning&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>Spring<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>Habitat<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>SpringMVC<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">tr</span> <span class="attr">class</span>=<span class="string">&quot;danger&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>SpringMVC<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>MySqL-plus<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">td</span>&gt;</span>Node.js<span class="tag">&lt;/<span class="name">td</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">tr</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">table</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="表单"><a href="#表单" class="headerlink" title="表单"></a>表单</h3><p> 表单主要功能是用来与用户做交流的一个网页控件，良好的表单设计能够让网页与用户更好的沟通。表单中常见的元素主要包括：文本输入框、下拉选择框、单选按钮、复选按钮、文本域和按钮等。</p>
<h4 id="表单控件"><a href="#表单控件" class="headerlink" title="表单控件"></a>表单控件</h4><h5 id="输入框-text"><a href="#输入框-text" class="headerlink" title="输入框 text"></a>输入框 text</h5><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;text&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control input-sm&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="下拉选择框-select"><a href="#下拉选择框-select" class="headerlink" title="下拉选择框 select"></a>下拉选择框 select</h5><p> 多行选择设置：multiple=“multiple”</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-2&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">label</span>&gt;</span></span><br><span class="line">            请选择城市：</span><br><span class="line">            <span class="tag">&lt;<span class="name">select</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>上海<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>长沙<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>北京<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span><span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">label</span>&gt;</span></span><br><span class="line">            请选择城市：</span><br><span class="line">            <span class="tag">&lt;<span class="name">select</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span> <span class="attr">multiple</span>=<span class="string">&quot;multiple&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>上海<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>长沙<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span>北京<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">option</span>&gt;</span><span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-2&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="文本域-textarea"><a href="#文本域-textarea" class="headerlink" title="文本域 textarea"></a>文本域 textarea</h5><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">textarea</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">textarea</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="复选框-checkbox"><a href="#复选框-checkbox" class="headerlink" title="复选框 checkbox"></a>复选框 checkbox</h5><p> 垂直显示： .checkbox</p>
<p> 水平显示： .checkbox-inline</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 垂直显示 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>游戏<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>学习<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">hr</span>/&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 水平显示 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;checkbox-inline&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>游戏</span><br><span class="line">            <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;checkbox-inline&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>学习</span><br><span class="line">            <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="复选框-checkbox-1"><a href="#复选框-checkbox-1" class="headerlink" title="复选框 checkbox"></a>复选框 checkbox</h5><p>垂直显示：.checkbox</p>
<p>水平显示： .checkbox-inline</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 垂直显示 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;radio&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;radio&quot;</span>&gt;</span>男<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;radio&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;radio&quot;</span>&gt;</span>女<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">hr</span>/&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 水平显示 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;radio-inline&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;radio&quot;</span>&gt;</span>男</span><br><span class="line">            <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;radio-inline&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;radio&quot;</span>&gt;</span>女</span><br><span class="line">            <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-4&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="按钮"><a href="#按钮" class="headerlink" title="按钮"></a>按钮</h5><p>1、使用 button 实现</p>
<ul>
<li><p>基础样式： btn    </p>
</li>
<li><p>附加样式：btn-primary btn-info btn-success btn-warning btn-danger btn-link btn-default</p>
</li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-danger&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-info&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-success&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-default&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-warning&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-link&quot;</span>&gt;</span>按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>2、多标签支持：使 a标签 div标签 等制作按钮</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-info&quot;</span>&gt;</span>a标签按钮<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-success&quot;</span>&gt;</span>span标签按钮<span class="tag">&lt;/<span class="name">span</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-warning&quot;</span>&gt;</span>div标签按钮<span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>3、按钮大小</p>
<p> 使用 .btn-lg、.btn-sm 或 .btn-xs 就可以获得不同尺寸的按钮</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary btn-xs&quot;</span>&gt;</span>超小按钮.btn-xs<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary btn-sm&quot;</span>&gt;</span>小型按钮.btn-sm<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary&quot;</span>&gt;</span>正常按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary btn-lg&quot;</span>&gt;</span>大型按钮.btn-lg<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br></pre></td></tr></table></figure>
<p>4、按钮禁用</p>
<ul>
<li>方法1：在标签中添加disabled属性<strong>==样式也改变，按钮点击也没有作用了==</strong></li>
<li>方法2：在元素标签中添加类名”disabled” <strong>==该禁用只是样式上禁用，实际按钮还能使用==</strong></li>
<li><strong>在class属性中添加disabled只是样式上禁用了，并不是真正的禁用了此按钮！</strong></li>
</ul>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-danger&quot;</span> <span class="attr">disabled</span>=<span class="string">&quot;disabled&quot;</span> <span class="attr">onclick</span>=<span class="string">&quot;a()&quot;</span>&gt;</span>禁用按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-danger disabled&quot;</span> <span class="attr">onclick</span>=<span class="string">&quot;a()&quot;</span>&gt;</span>禁用按钮<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span>&gt;</span><span class="language-javascript"></span></span><br><span class="line"><span class="language-javascript">    <span class="keyword">function</span> <span class="title function_">a</span>(<span class="params"></span>)&#123;</span></span><br><span class="line"><span class="language-javascript">        <span class="title function_">alert</span>(<span class="string">&quot;123&quot;</span>)</span></span><br><span class="line"><span class="language-javascript">    &#125;</span></span><br><span class="line"><span class="language-javascript"></span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="表单布局"><a href="#表单布局" class="headerlink" title="表单布局"></a>表单布局</h4><p> 基本的表单结构是 Bootstrap 自带的，个别的表单控件自动接收一些全局样式。</p>
<p>下面列出了创建基本表单的步骤：</p>
<ul>
<li>向父<code>&lt;from&gt;</code>元素添加 role=“form”。</li>
<li>把标签和控件放在一个带有 class.form-group的<code>&lt;div&gt;</code>中。这是获取最佳间距所必需的。</li>
<li>向所有的文本元素 <code>&lt;input&gt;、&lt;textarea&gt;和&lt;select&gt;</code>添加 class =“<em>form-control</em>” 。</li>
</ul>
<h5 id="水平表单"><a href="#水平表单" class="headerlink" title="水平表单"></a>水平表单</h5><p> 同一行显示form-horizontal</p>
<p> 配合Bootstrap框架的网格系统</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">form</span> <span class="attr">action</span>=<span class="string">&quot;&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-horizontal &quot;</span> <span class="attr">role</span>=<span class="string">&quot;form&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--表单中的表单元素组--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">h2</span> <span class="attr">class</span>=<span class="string">&quot;text-center&quot;</span>&gt;</span>用户表信息<span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">&quot;username&quot;</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>用户名：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">id</span>=<span class="string">&quot;username&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入用户名&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="comment">&lt;!--表单中的表单元素组--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">&quot;password&quot;</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>密码：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">id</span>=<span class="string">&quot;password&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入用户名&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>兴趣爱好：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;checkbox-inline&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>游戏</span><br><span class="line">                <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;checkbox-inline&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>&gt;</span>学习</span><br><span class="line">                <span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>请选择城市：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">select</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">option</span>&gt;</span>上海<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">option</span>&gt;</span>长沙<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">option</span>&gt;</span>北京<span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">option</span>&gt;</span><span class="tag">&lt;/<span class="name">option</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">select</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">label</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>简介：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">textarea</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">textarea</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8 col-xs-offset-5&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="内联表单"><a href="#内联表单" class="headerlink" title="内联表单"></a>内联表单</h5><p> 将表单的控件都在一行内显示form-inline</p>
<p> 注意label不会显示，存在的意义：如果没有为输入控件设置label标签，屏幕阅读器将无法正确识别。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-10 col-xs-offset-2&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">form</span> <span class="attr">class</span>=<span class="string">&quot;form-inline&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span>邮箱<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;email&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入邮箱&quot;</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span>密码<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;pwd&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入密码&quot;</span>/&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group checkbox&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">label</span>&gt;</span><span class="tag">&lt;<span class="name">input</span> <span class="attr">type</span>=<span class="string">&quot;checkbox&quot;</span>/&gt;</span>记住密码<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary &quot;</span>&gt;</span>提交<span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="缩略图"><a href="#缩略图" class="headerlink" title="缩略图"></a>缩略图</h3><p> 缩略图在电商类的网站很常见，最常用的地方就是产品列表页面。缩略图的实现是配合网格系统一起使用。同时还可以让缩略图配合标题、描述内容，按钮等。</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;container&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;row&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-3&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;thumbnail&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">img</span> <span class="attr">src</span>=<span class="string">&quot;../resource/img/图片2.webp&quot;</span> <span class="attr">alt</span>=<span class="string">&quot;...&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">h3</span>&gt;</span>高圆圆<span class="tag">&lt;/<span class="name">h3</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">p</span>&gt;</span>出生于北京市，中国内地影视女演员、模特。<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-default&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;glyphicon glyphicon-heart&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>喜欢</span><br><span class="line">                <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-info&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;glyphicon glyphicon-pencil&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span>评论</span><br><span class="line">                <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="面板"><a href="#面板" class="headerlink" title="面板"></a>面板</h3><p> 默认的 .panel组件所做的只是设置基本的边框（border）和内补（padding）来包含内容。</p>
<p> .panel-default：默认样式</p>
<p> .panel-heading：面板头</p>
<p> .panel-body：面板主体内容</p>
<h2 id="Bootstrap插件"><a href="#Bootstrap插件" class="headerlink" title="Bootstrap插件"></a>Bootstrap插件</h2><h3 id="导航"><a href="#导航" class="headerlink" title="导航"></a>导航</h3><p> 使用下拉与按钮组合可以制作导航</p>
<p> 要点:</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"></span><br></pre></td></tr></table></figure>
<h4 id="标签式导航"><a href="#标签式导航" class="headerlink" title="标签式导航"></a>标签式导航</h4><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">p</span>&gt;</span>标签式的导航菜单<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;nav nav-tabs&quot;</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;active&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Home<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>SVN<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>iOS<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>VB.Net<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Java<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>PHP<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="胶囊式导航"><a href="#胶囊式导航" class="headerlink" title="胶囊式导航"></a>胶囊式导航</h4><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">p</span>&gt;</span>基本的胶囊式导航菜单<span class="tag">&lt;/<span class="name">p</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;nav nav-pills&quot;</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;active&quot;</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Home<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>SVN<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>iOS<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>VB.Net<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Java<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>PHP<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="分页"><a href="#分页" class="headerlink" title="分页"></a>分页</h3><p> 分页随处可见，分为页码导航和翻页导航</p>
<p> 页码导航：ul标签上加pagination [pagination-lg | pagination-sm]</p>
<p> 翻页导航：ul标签上加pager</p>
<h5 id="分页-1"><a href="#分页-1" class="headerlink" title="分页"></a>分页</h5><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;pagination&quot;</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span><span class="symbol">&amp;laquo;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>1<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>2<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>3<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>4<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>5<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">	<span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span><span class="symbol">&amp;raquo;</span><span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h5 id="翻页"><a href="#翻页" class="headerlink" title="翻页"></a>翻页</h5><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;pager&quot;</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Previous<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">li</span>&gt;</span><span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>Next<span class="tag">&lt;/<span class="name">a</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="下拉菜单"><a href="#下拉菜单" class="headerlink" title="下拉菜单"></a>下拉菜单</h3><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--</span></span><br><span class="line"><span class="comment">1、使用一个类名为dropdown 或btn-group的div 包裹整个下拉框: &lt;div class=&quot;dropdown&quot;&gt;&lt;/div&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">2、默认向下dropdown，向上弹起加入 . dropup 即可</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">3、使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性</span></span><br><span class="line"><span class="comment">&lt;button type=&quot;button&quot; class=&quot;btn btn-default dropdown-toggle&quot; data-toggle=&quot;dropdown&quot;&gt;&lt;/button&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">4、在button中 使用font 制作下拉箭头：&lt;span class=&quot;caret&quot;&gt;&lt;/span&gt;</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">5、下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">6、分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">7、分组标题: li 添加类名 “dropdown-header” 来实现分组的功能</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">8、对齐方式:</span></span><br><span class="line"><span class="comment">	1)、dropdown-menu-left  左对齐 默认样式</span></span><br><span class="line"><span class="comment">	2)、dropdown-menu-right   右对齐</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">9、激活状态（.active）和禁用状态（.disabled）</span></span><br><span class="line"><span class="comment"></span></span><br><span class="line"><span class="comment">--&gt;</span></span><br></pre></td></tr></table></figure>
<p> 在使用Bootstrap框架的下拉菜单时，必须使用两个js</p>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!-- 如果要使用Bootstrap的js插件，必须先调入jQuery --&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;js/jquery-3.4.1.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line"><span class="comment">&lt;!-- 包括所有bootstrap的js插件或者可以根据需要使用的js插件调用　--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;js/bootstrap.min.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">&lt;!--使用一个类名为dropdown,默认向下dropdown，向上弹起加入 . dropup 即可--&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;dropdown &quot;</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">button</span> <span class="attr">type</span>=<span class="string">&quot;button&quot;</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-default dropdown-toggle&quot;</span> <span class="attr">data-toggle</span>=<span class="string">&quot;dropdown&quot;</span>&gt;</span></span><br><span class="line">        喜欢频道 <span class="tag">&lt;<span class="name">span</span> <span class="attr">class</span>=<span class="string">&quot;caret&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">span</span>&gt;</span><span class="comment">&lt;!--下拉箭头--&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">    <span class="comment">&lt;!--下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu--&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">ul</span> <span class="attr">class</span>=<span class="string">&quot;dropdown-menu&quot;</span>&gt;</span>	 <span class="comment">&lt;!--dropdown-menu-right右对齐--&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--分组标题: li 添加类名 “dropdown-header” 来实现分组的功能--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;dropdown-header&quot;</span>&gt;</span>----科普----<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>人与自然<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;divider&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;dropdown-header&quot;</span>&gt;</span>----搞笑----<span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>欢乐喜剧人<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>快乐大本营<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;divider&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">li</span> <span class="attr">class</span>=<span class="string">&quot;disabled&quot;</span>&gt;</span>	<span class="comment">&lt;!--禁用状态--&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">a</span> <span class="attr">href</span>=<span class="string">&quot;#&quot;</span>&gt;</span>生活大爆炸<span class="tag">&lt;/<span class="name">a</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">li</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">ul</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h3 id="模态框"><a href="#模态框" class="headerlink" title="模态框"></a>模态框</h3><p> 模态框（Modal）是覆盖在父窗体上的子窗体。通常，目的是显示来自一个单独的源的内容，可以在不离开父窗体的情况下有一些互动。子窗体可提供信息、交互等。</p>
<h4 id="用法"><a href="#用法" class="headerlink" title="用法"></a>用法</h4><p>1、通过 data 属性：在控制器元素（比如按钮或者链接）上设置属性 data-toggle=“modal”，同时设置 data-target=”#identifier” 或 href=”#identifier” 来指定要切换的特定的模态框（带有 id=“identifier”）。</p>
<p>2、通过 JavaScript：使用这种技术，可以通过 JavaScript 来调用带有 id=“identifier” 的模态框：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$(<span class="string">&#x27;#identifier&#x27;</span>).<span class="title function_">modal</span>(options);</span><br></pre></td></tr></table></figure>
<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">&lt;!DOCTYPE <span class="keyword">html</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;<span class="name">html</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">head</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">meta</span> <span class="attr">charset</span>=<span class="string">&quot;utf-8&quot;</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">title</span>&gt;</span>Bootstrap 实例 - 模态框（Modal）插件<span class="tag">&lt;/<span class="name">title</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">link</span> <span class="attr">rel</span>=<span class="string">&quot;stylesheet&quot;</span> <span class="attr">href</span>=<span class="string">&quot;../resource/bootstrap/css/bootstrap.css&quot;</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--如果需要使用bootstrap插件需要先引入jQuery--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;../resource/js/jquery-3.6.0.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!--虽有的bootstrap的js文件需要都是先要有jQuery文件--&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">script</span> <span class="attr">src</span>=<span class="string">&quot;../resource/bootstrap/js/bootstrap.js&quot;</span>&gt;</span><span class="tag">&lt;/<span class="name">script</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;/<span class="name">head</span>&gt;</span></span><br><span class="line">    <span class="tag">&lt;<span class="name">body</span>&gt;</span></span><br><span class="line"></span><br><span class="line">        <span class="tag">&lt;<span class="name">h2</span>&gt;</span>创建模态框（Modal）<span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 按钮触发模态框 --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">button</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary btn-lg&quot;</span> <span class="attr">data-toggle</span>=<span class="string">&quot;modal&quot;</span> <span class="attr">data-target</span>=<span class="string">&quot;#myModal&quot;</span>&gt;</span></span><br><span class="line">            开始演示模态框</span><br><span class="line">        <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">        <span class="comment">&lt;!-- 模态框（Modal） --&gt;</span></span><br><span class="line">        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;modal fade&quot;</span> <span class="attr">id</span>=<span class="string">&quot;myModal&quot;</span> <span class="attr">tabindex</span>=<span class="string">&quot;-1&quot;</span> <span class="attr">role</span>=<span class="string">&quot;dialog&quot;</span> <span class="attr">aria-labelledby</span>=<span class="string">&quot;myModalLabel&quot;</span></span></span><br><span class="line"><span class="tag">             <span class="attr">aria-hidden</span>=<span class="string">&quot;true&quot;</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;modal-dialog&quot;</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;modal-content&quot;</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;modal-header&quot;</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;<span class="name">button</span> <span class="attr">type</span>=<span class="string">&quot;button&quot;</span> <span class="attr">class</span>=<span class="string">&quot;close&quot;</span> <span class="attr">data-dismiss</span>=<span class="string">&quot;modal&quot;</span> <span class="attr">aria-hidden</span>=<span class="string">&quot;true&quot;</span>&gt;</span></span><br><span class="line">                            <span class="symbol">&amp;times;</span></span><br><span class="line">                        <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;<span class="name">h2</span> <span class="attr">class</span>=<span class="string">&quot;text-center&quot;</span>&gt;</span>用户表信息<span class="tag">&lt;/<span class="name">h2</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">                    <span class="tag">&lt;<span class="name">form</span> <span class="attr">id</span>=<span class="string">&quot;user-form&quot;</span> <span class="attr">action</span>=<span class="string">&quot;../2、常用样式/9、按钮.html&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-horizontal &quot;</span> <span class="attr">role</span>=<span class="string">&quot;form&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">                        <span class="tag">&lt;<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">                            <span class="comment">&lt;!--表单中的表单元素组--&gt;</span></span><br><span class="line">                            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line"></span><br><span class="line">                                <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">&quot;username&quot;</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>用户名：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">                                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                                    <span class="tag">&lt;<span class="name">input</span> <span class="attr">id</span>=<span class="string">&quot;username&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入用户名&quot;</span> <span class="attr">name</span>=<span class="string">&quot;username&quot;</span> <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">                                <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">                            <span class="comment">&lt;!--表单中的表单元素组--&gt;</span></span><br><span class="line">                            <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;form-group&quot;</span>&gt;</span></span><br><span class="line">                                <span class="tag">&lt;<span class="name">label</span> <span class="attr">for</span>=<span class="string">&quot;password&quot;</span> <span class="attr">class</span>=<span class="string">&quot;control-label col-md-2&quot;</span>&gt;</span>密码：<span class="tag">&lt;/<span class="name">label</span>&gt;</span></span><br><span class="line">                                <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;col-md-8&quot;</span>&gt;</span></span><br><span class="line">                                    <span class="tag">&lt;<span class="name">input</span> <span class="attr">id</span>=<span class="string">&quot;password&quot;</span> <span class="attr">type</span>=<span class="string">&quot;password&quot;</span> <span class="attr">name</span>=<span class="string">&quot;password&quot;</span> <span class="attr">placeholder</span>=<span class="string">&quot;请输入用户名&quot;</span></span></span><br><span class="line"><span class="tag">                                           <span class="attr">class</span>=<span class="string">&quot;form-control&quot;</span>&gt;</span></span><br><span class="line">                                <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                            </span><br><span class="line">                        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;<span class="name">div</span> <span class="attr">class</span>=<span class="string">&quot;modal-footer&quot;</span>&gt;</span></span><br><span class="line">                            <span class="tag">&lt;<span class="name">button</span> <span class="attr">type</span>=<span class="string">&quot;button&quot;</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-default&quot;</span> <span class="attr">data-dismiss</span>=<span class="string">&quot;modal&quot;</span>&gt;</span>关闭</span><br><span class="line">                            <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">                            <span class="tag">&lt;<span class="name">button</span> <span class="attr">type</span>=<span class="string">&quot;submit&quot;</span> <span class="attr">class</span>=<span class="string">&quot;btn btn-primary&quot;</span> <span class="attr">id</span>=<span class="string">&quot;submit_btn&quot;</span>&gt;</span></span><br><span class="line">                                提交更改</span><br><span class="line">                            <span class="tag">&lt;/<span class="name">button</span>&gt;</span></span><br><span class="line">                        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">                    <span class="tag">&lt;/<span class="name">form</span>&gt;</span></span><br><span class="line">                <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">            <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line">        <span class="tag">&lt;/<span class="name">div</span>&gt;</span></span><br><span class="line"></span><br><span class="line">    <span class="tag">&lt;/<span class="name">body</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">html</span>&gt;</span></span><br></pre></td></tr></table></figure>
<h4 id="方法"><a href="#方法" class="headerlink" title="方法"></a>方法</h4><div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:center">方法</th>
<th style="text-align:center">描述</th>
<th style="text-align:center">实例</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center"><strong>Toggle:</strong> .modal(‘toggle’)</td>
<td style="text-align:center">手动切换模态框。</td>
<td style="text-align:center"><code>$(&#39;#identifier&#39;).modal(&#39;toggle&#39;);</code></td>
</tr>
<tr>
<td style="text-align:center"><strong>Show:</strong> .modal(‘show’)</td>
<td style="text-align:center">手动打开模态框。</td>
<td style="text-align:center"><code>$(&#39;#identifier&#39;).modal(&#39;show&#39;);</code></td>
</tr>
<tr>
<td style="text-align:center"><strong>Hide:</strong> .modal(‘hide’)</td>
<td style="text-align:center">手动隐藏模态框。</td>
<td style="text-align:center"><code>$(&#39;#identifier&#39;).modal(&#39;hide&#39;);</code></td>
</tr>
</tbody>
</table>
</div>
<p><img src= "" data-lazy-src="https://www.naste.top:9000/webp/%E6%A8%A1%E6%80%81%E6%A1%86%E6%96%B9%E6%B3%95.webp" alt="image-20210325220934030"></p>
</article><div class="post-copyright"><div class="post-copyright__title"><span class="post-copyright-info"><h>Bootstrap</h></span></div><div class="post-copyright__type"><span class="post-copyright-info"><a href="https://www.naste.top:1024/posts/d352c4d3.html">https://www.naste.top:1024/posts/d352c4d3.html</a></span></div><div class="post-copyright-m"><div class="post-copyright-m-info"><div class="post-copyright-a"><h>作者</h><div class="post-copyright-cc-info"><h>XiaoFei🥝</h></div></div><div class="post-copyright-c"><h>发布于</h><div class="post-copyright-cc-info"><h>2022-06-26</h></div></div><div class="post-copyright-u"><h>更新于</h><div class="post-copyright-cc-info"><h>2024-04-26</h></div></div><div class="post-copyright-c"><h>许可协议</h><div class="post-copyright-cc-info"><a class="icon" rel="noopener" target="_blank" title="Creative Commons" href="https://creativecommons.org/"><i class="fab fa-creative-commons"></i></a><a rel="noopener" target="_blank" title="CC BY-NC-SA 4.0" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a></div></div></div></div></div><div class="tag_share"><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Bootstrap/"><div class="tags-punctuation"><svg class="faa-tada icon" style="height:1.1em;width:1.1em;fill:currentColor;position:relative;top:2px;margin-right:3px" aria-hidden="true"><use xlink:href="#icon-sekuaibiaoqian"></use></svg></div>Bootstrap</a></div></div><link rel="stylesheet" href="/css/coin.css" media="defer" onload="this.media='all'"/><div class="post-reward"><button class="tip-button reward-button"><span class="tip-button__text">投喂作者</span><div class="coin-wrapper"><div class="coin"><div class="coin__middle"></div><div class="coin__back"></div><div class="coin__front"></div></div></div><div class="reward-main"><ul class="reward-all"><li class="reward-item"><a href="https://www.naste.top:9000/images/wechat.jpg" target="_blank"><img class="post-qr-code-img" src= "" data-lazy-src="https://www.naste.top:9000/images/wechat.jpg" alt="微信"/></a><div class="post-qr-code-desc">微信</div></li><li class="reward-item"><a href="https://www.naste.top:9000/images/alipay.jpg" target="_blank"><img class="post-qr-code-img" src= "" data-lazy-src="https://www.naste.top:9000/images/alipay.jpg" alt="支付宝"/></a><div class="post-qr-code-desc">支付宝</div></li></ul></div></button></div><audio id="coinAudio" src="https://npm.elemecdn.com/akilar-candyassets@1.0.36/audio/aowu.m4a"></audio><script defer="defer" src="/js/coin.js"></script><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/posts/10644459.html"><img class="prev-cover" src= "" data-lazy-src="https://www.naste.top:9000/webp/1515952743772.webp" onerror="onerror=null;src='/assets/r2.jpg'" alt="cover of previous post"><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">CSS基本使用</div></div></a></div><div class="next-post pull-right"><a href="/posts/1633003990.html"><img class="next-cover" src= "" data-lazy-src="https://www.naste.top:9000/webp/1515952743807.webp" onerror="onerror=null;src='/assets/r2.jpg'" alt="cover of next post"><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">Axios</div></div></a></div></nav><hr/><div id="post-comment"><div class="comment-head"><div class="comment-headline"><i class="fas fa-comments fa-fw"></i><span> 评论</span></div></div><div class="comment-wrap"><div><div id="twikoo-wrap"></div></div></div></div></div><div class="aside-content" id="aside-content"><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><svg class="meta_icon" style="width:22px;height:22px;position:relative;top:5px"><use xlink:href="#icon-mulu1"></use></svg><span style="font-weight:bold">目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#Bootstrap"><span class="toc-text">Bootstrap</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%B8%83%E5%B1%80%E5%AE%B9%E5%99%A8%E5%92%8C%E6%A0%85%E6%A0%BC%E7%BD%91%E6%A0%BC%E7%B3%BB%E7%BB%9F"><span class="toc-text">布局容器和栅格网格系统</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#1%E3%80%81%E5%B8%83%E5%B1%80%E5%AE%B9%E5%99%A8"><span class="toc-text">1、布局容器</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#2%E3%80%81%E6%A0%85%E6%A0%BC%E7%BD%91%E6%A0%BC%E7%B3%BB%E7%BB%9F"><span class="toc-text">2、栅格网格系统</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%A0%85%E6%A0%BC%E5%8F%82%E6%95%B0"><span class="toc-text">栅格参数</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%97%E7%BB%84%E5%90%88"><span class="toc-text">列组合</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%97%E5%81%8F%E7%A7%BB"><span class="toc-text">列偏移</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%97%E6%8E%92%E5%BA%8F"><span class="toc-text">列排序</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%97%E5%B5%8C%E5%A5%97"><span class="toc-text">列嵌套</span></a></li></ol></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#%E5%B8%B8%E7%94%A8%E6%A0%B7%E5%BC%8F"><span class="toc-text">常用样式</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%8E%92%E7%89%88"><span class="toc-text">排版</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%A0%87%E9%A2%98"><span class="toc-text">标题</span></a></li></ol></li></ol></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link"><span class="toc-text">—-，只不过Bootstrap覆盖了默认的样式，使其在所有浏览器中的效果都一样
为了让非标题标签的和标题标签使用相同的样式，还特意定义了h1—-h6里六个类名，同时使用乐意紧跟着一行小的副标题或使用 .small
1234567&lt;h1&gt;标题1    &lt;small&gt;副标题&lt;&#x2F;small&gt;&lt;&#x2F;h1&gt;&lt;h2&gt;标题2    &lt;span class&#x3D;&quot;small&quot;&gt;我是副标题，加了small类属性，有了副标题的效果&lt;&#x2F;span&gt;&lt;&#x2F;h2&gt;&lt;div class&#x3D;&quot;h1&quot;&gt;我是div，使用了Bootstrap有了h1标签的效果&lt;&#x2F;div&gt;
段落 段落是排版中另一个重要元素之一。
通过.lead 来突出强调内容(其作用就是增大文本字号，加粗文本，而且对行高和margin也做相应的处理。可以使用以下标签给文本做突出样式处理：
1234567891011121314151617        &lt;!--		使用lead         小号字： &lt;small&gt;         加粗： &lt;b&gt; &lt;strong&gt;         斜体：&lt;i&gt;  &lt;em&gt;        --&gt;&lt;p class&#x3D;&quot;lead&quot;&gt;    &lt;b&gt;通过.lead&lt;&#x2F;b&gt;     来突出强调内容(     &lt;small&gt;其作用就是增大文本字号，&lt;&#x2F;small&gt;    &lt;strong&gt;加粗文本&lt;&#x2F;strong&gt;，    &lt;i&gt;而且&lt;&#x2F;i&gt;	对行高和    &lt;em&gt;margin&lt;&#x2F;em&gt;    也做相应的处理。可以使用以下标签给文本做突出样式处理：&lt;&#x2F;p&gt;
强调 定义了一套类名，这里称其为强调类名，这些强调类都是通过字体颜色来表示强调，具本说明如下：
123456789101112131415&lt;!--.text-muted：提示，使用浅灰色（#999）.text-primary：主要，使用蓝色（#428bca）.text-success：成功，使用浅绿色(#3c763d).text-info：通知信息，使用浅蓝色（#31708f）.text-warning：警告，使用黄色（#8a6d3b）.text-danger：危险，使用褐色（#a94442）--&gt;&lt;div class&#x3D;&quot;text-muted&quot;&gt;提示效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-primary&quot;&gt;主要效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-success&quot;&gt;成功效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-info&quot;&gt;信息效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-warning&quot;&gt;警告效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-danger&quot;&gt;危险效果&lt;&#x2F;div&gt;
对齐效果1、 在CSS中常常使用text-align来实现文本的对齐风格的设置。
 2、为了简化操作，方便使用，Bootstrap通过定义四个类名来控制文本的对齐风格：.text-left：左对齐 .text-center：居中对齐 .text-right：右对齐 .text-justify：两端对齐。
3、 其中主要有四种风格：
1234567891011121314&lt;!--左对齐，取值：text-left ;居中对齐，取值：text-center;右对齐，取值：text-right ;两端对齐，取值：text-justify。--&gt;&lt;p class&#x3D;&quot;text-left&quot;&gt;我居左&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-center&quot;&gt;我居中&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-right&quot;&gt;我居右&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-justify&quot;&gt;    网格系统的实现原理非常简单，仅仅是通过定义容器大小，平分12份(也有平分成24份或32份，但12份是最常见的)，    再调整内外边距，最后结合媒体查询，就制作出了强大的响应式网格系统。Bootstrap框架中的网格系统就是将容器平分成12份&lt;&#x2F;p&gt;
列表在HTML中，列表有如下三种

无序列表：（   ...   ）
有序列表：（   ...   ）
定义列表：（   ...    ...   ）

&#x3D;&#x3D;去点列表&#x3D;&#x3D;
1234&lt;ul class&#x3D;&quot;list-unstyled&quot;&gt;    &lt;li&gt;无序项目列表一&lt;&#x2F;li&gt;	&lt;li&gt;无序项目列表二&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
&#x3D;&#x3D;内联列表&#x3D;&#x3D;
 class&#x3D;“list-inline”，把垂直列表换成水平列表，而且去掉项目符号（编号），保持水平显示。也可以说内联列表就是为制作水平导航而生。
12345&lt;ul class&#x3D;&quot;list-inline&quot;&gt;	&lt;li&gt;首页&lt;&#x2F;li&gt;	&lt;li&gt;java学院&lt;&#x2F;li&gt;	&lt;li&gt;在线课堂&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
&#x3D;&#x3D;定义列表&#x3D;&#x3D;
 在原有的基础加入了一些样式，使用样式 class&#x3D;“dl-horizontal” 制作水平定义列表 : 当标题宽度超过160px时，将会显示三个省略号。
123456789101112&lt;dl&gt;	&lt;dt&gt;HTML&lt;&#x2F;dt&gt;	&lt;dd&gt;超文本标记语言&lt;&#x2F;dd&gt;	&lt;dt&gt;CSS&lt;&#x2F;dt&gt;	&lt;dd&gt;层叠样式表是一种样式表语言&lt;&#x2F;dd&gt;&lt;&#x2F;dl&gt;&lt;dl class&#x3D;&quot;dl-horizontal&quot;&gt;    &lt;dt&gt;HTML 超文本标记语言&lt;&#x2F;dt&gt;    &lt;dd&gt;HTML称为超文本标记语言，是一种标识性的语言。&lt;&#x2F;dd&gt;		       &lt;dt&gt;测试标题不能超过160px的宽度,否则2个点&lt;&#x2F;dt&gt;    &lt;dd&gt;我在写一个水平定义列表的效果，我在写一个水平定义列表的效果。&lt;&#x2F;dd&gt;&lt;&#x2F;dl&gt;
代码 一般在个人博客上使用的较为频繁，用于显示代码的风格。在Bootstrap主要提供了三种代码风格：
（1）使用&lt;code&gt;&lt;&#x2F;code&gt;来显示单行内联代码
（2）使用&lt;pre&gt;&lt;&#x2F;pre&gt;来显示多行代码
​            样式： 样式：pre-scrollable (height,max-height高度固定,为340px,超过存在滚动条)
（3）使用&lt;kbd&gt;&lt;&#x2F;kbd&gt;来显示用户输入代码,如快捷键
&#x3D;&#x3D;单行代码&#x3D;&#x3D;
12 &lt;!--单行代码--&gt;&lt;code&gt;public void main(){ ... }&lt;&#x2F;code&gt;
&#x3D;&#x3D;多行代码块&#x3D;&#x3D;
123456789101112131415161718192021222324252627282930313233        &lt;!--多行代码--&gt;        &lt;pre&gt;public String testFunction() {    System.out.println(&quot;控制器中的方法执行了&quot;);    return &quot;hello&quot;;}        &lt;&#x2F;pre&gt;        &lt;!--            显示html标签的代码需要适应字符实体            小于号（&lt;）要使用硬编码“&lt;”来替代，大于号(&gt;)使用“&gt;”来替代        --&gt;        &lt;pre&gt;			&lt;ul&gt;				&lt;li&gt;测试实体符&lt;&#x2F;li&gt;			&lt;&#x2F;ul&gt;		&lt;&#x2F;pre&gt;        &lt;!-- 当高度超过，会存在滚动条 --&gt;        &lt;pre class&#x3D;&quot;pre-scrollable&quot;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;		&lt;&#x2F;pre&gt;
&#x3D;&#x3D;快捷键&#x3D;&#x3D;
12&lt;!--显示高亮词--&gt;保存使用：&lt;kbd&gt;ctrl&lt;&#x2F;kbd&gt;+&lt;kbd&gt;s&lt;&#x2F;kbd&gt;
表格&#x3D;&#x3D;表格样式&#x3D;&#x3D;
 Bootstrap为表格提供了1种基础样式和4种附加样式以及1个支持响应式的表格。在使用Bootstrap的表格过程中，只需要添加对应的类名就可以得到不同的表格风格：
&#x3D;&#x3D;基础样式&#x3D;&#x3D;
1、基础表格
&#x3D;&#x3D;附加样式&#x3D;&#x3D;
1234567&lt;!--table：table-striped：斑马线表格table-bordered：带边框的表格table-hover：鼠标悬停高亮的表格table-condensed：紧凑型表格，单元格没内距或者内距较其他表格的内距小--&gt;
1&lt;table class&#x3D;&quot;table table-striped table-bordered table-hover table-condensed&quot;&gt;&lt;&#x2F;table&gt;
&#x3D;&#x3D;&lt;tr&gt;、&lt;th&gt;、&lt;td&gt;样式&#x3D;&#x3D;
 提供了五种不同的类名，每种类名控制了行的不同背景颜色

123456789101112131415161718192021222324252627&lt;table class&#x3D;&quot;table table-striped table-bordered table-hover table-condensed&quot;&gt;    &lt;tr class&#x3D;&quot;active&quot;&gt;        &lt;th &gt;JavaSE&lt;&#x2F;th&gt;        &lt;th&gt;数据库&lt;&#x2F;th&gt;        &lt;th&gt;JavaScript&lt;&#x2F;th&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;success&quot;&gt;        &lt;td&gt;面向对象&lt;&#x2F;td&gt;        &lt;td&gt;oracle&lt;&#x2F;td&gt;        &lt;td&gt;json&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;info&quot;&gt;        &lt;td&gt;数组&lt;&#x2F;td&gt;        &lt;td&gt;mysql&lt;&#x2F;td&gt;        &lt;td&gt;ajax&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;warning&quot;&gt;        &lt;td&gt;Spring&lt;&#x2F;td&gt;        &lt;td&gt;Habitat&lt;&#x2F;td&gt;        &lt;td&gt;SpringMVC&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;danger&quot;&gt;        &lt;td&gt;SpringMVC&lt;&#x2F;td&gt;        &lt;td&gt;MySqL-plus&lt;&#x2F;td&gt;        &lt;td&gt;Node.js&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;&lt;&#x2F;table&gt;
表单 表单主要功能是用来与用户做交流的一个网页控件，良好的表单设计能够让网页与用户更好的沟通。表单中常见的元素主要包括：文本输入框、下拉选择框、单选按钮、复选按钮、文本域和按钮等。
表单控件输入框 text1234567891011&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;input type&#x3D;&quot;text&quot; class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;input type&#x3D;&quot;text&quot; class&#x3D;&quot;form-control input-sm&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
下拉选择框 select 多行选择设置：multiple&#x3D;“multiple”
1234567891011121314151617181920212223242526&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-2&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;label&gt;            请选择城市：            &lt;select class&#x3D;&quot;form-control&quot;&gt;                &lt;option&gt;上海&lt;&#x2F;option&gt;                &lt;option&gt;长沙&lt;&#x2F;option&gt;                &lt;option&gt;北京&lt;&#x2F;option&gt;                &lt;option&gt;&lt;&#x2F;option&gt;            &lt;&#x2F;select&gt;        &lt;&#x2F;label&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;label&gt;            请选择城市：            &lt;select class&#x3D;&quot;form-control&quot; multiple&#x3D;&quot;multiple&quot;&gt;                &lt;option&gt;上海&lt;&#x2F;option&gt;                &lt;option&gt;长沙&lt;&#x2F;option&gt;                &lt;option&gt;北京&lt;&#x2F;option&gt;                &lt;option&gt;&lt;&#x2F;option&gt;            &lt;&#x2F;select&gt;        &lt;&#x2F;label&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-2&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
文本域 textarea1234567&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;textarea class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;textarea&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
复选框 checkbox 垂直显示： .checkbox
 水平显示： .checkbox-inline
1234567891011121314151617181920212223242526&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;!-- 垂直显示 --&gt;        &lt;div&gt;            &lt;div class&#x3D;&quot;checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&gt;学习&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;hr&#x2F;&gt;        &lt;!-- 水平显示 --&gt;        &lt;div&gt;            &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                &lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏            &lt;&#x2F;label&gt;            &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                &lt;input type&#x3D;&quot;checkbox&quot;&gt;学习            &lt;&#x2F;label&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
复选框 checkbox垂直显示：.checkbox
水平显示： .checkbox-inline
12345678910111213141516171819202122232425&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;!-- 垂直显示 --&gt;        &lt;div&gt;            &lt;div class&#x3D;&quot;radio&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;radio&quot;&gt;男&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;radio&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;radio&quot;&gt;女&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;hr&#x2F;&gt;        &lt;!-- 水平显示 --&gt;        &lt;div&gt;            &lt;label class&#x3D;&quot;radio-inline&quot;&gt;                &lt;input type&#x3D;&quot;radio&quot;&gt;男            &lt;&#x2F;label&gt;            &lt;label class&#x3D;&quot;radio-inline&quot;&gt;                &lt;input type&#x3D;&quot;radio&quot;&gt;女            &lt;&#x2F;label&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
按钮1、使用 button 实现

基础样式： btn    

附加样式：btn-primary btn-info btn-success btn-warning btn-danger btn-link btn-default


12345678&lt;button class&#x3D;&quot;btn&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-danger&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-info&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-success&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-default&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-warning&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-link&quot;&gt;按钮&lt;&#x2F;button&gt;
2、多标签支持：使 a标签 div标签 等制作按钮
123&lt;a href&#x3D;&quot;#&quot; class&#x3D;&quot;btn btn-info&quot;&gt;a标签按钮&lt;&#x2F;a&gt;&lt;span class&#x3D;&quot;btn btn-success&quot;&gt;span标签按钮&lt;&#x2F;span&gt;&lt;div class&#x3D;&quot;btn btn-warning&quot;&gt;div标签按钮&lt;&#x2F;div&gt;
3、按钮大小
 使用 .btn-lg、.btn-sm 或 .btn-xs 就可以获得不同尺寸的按钮
1234&lt;button class&#x3D;&quot;btn btn-primary btn-xs&quot;&gt;超小按钮.btn-xs&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary btn-sm&quot;&gt;小型按钮.btn-sm&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary&quot;&gt;正常按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary btn-lg&quot;&gt;大型按钮.btn-lg&lt;&#x2F;button&gt;
4、按钮禁用

方法1：在标签中添加disabled属性&#x3D;&#x3D;样式也改变，按钮点击也没有作用了&#x3D;&#x3D;
方法2：在元素标签中添加类名”disabled” &#x3D;&#x3D;该禁用只是样式上禁用，实际按钮还能使用&#x3D;&#x3D;
在class属性中添加disabled只是样式上禁用了，并不是真正的禁用了此按钮！

1234567&lt;button class&#x3D;&quot;btn btn-danger&quot; disabled&#x3D;&quot;disabled&quot; onclick&#x3D;&quot;a()&quot;&gt;禁用按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-danger disabled&quot; onclick&#x3D;&quot;a()&quot;&gt;禁用按钮&lt;&#x2F;button&gt;&lt;script&gt;    function a(){        alert(&quot;123&quot;)    }&lt;&#x2F;script&gt;
表单布局 基本的表单结构是 Bootstrap 自带的，个别的表单控件自动接收一些全局样式。
下面列出了创建基本表单的步骤：

向父&lt;from&gt;元素添加 role&#x3D;“form”。
把标签和控件放在一个带有 class.form-group的&lt;div&gt;中。这是获取最佳间距所必需的。
向所有的文本元素 &lt;input&gt;、&lt;textarea&gt;和&lt;select&gt;添加 class &#x3D;“form-control” 。

水平表单 同一行显示form-horizontal
 配合Bootstrap框架的网格系统
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;form action&#x3D;&quot;&quot; class&#x3D;&quot;form-horizontal &quot; role&#x3D;&quot;form&quot;&gt;        &lt;!--表单中的表单元素组--&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;h2 class&#x3D;&quot;text-center&quot;&gt;用户表信息&lt;&#x2F;h2&gt;            &lt;label for&#x3D;&quot;username&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;用户名：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;input id&#x3D;&quot;username&quot; placeholder&#x3D;&quot;请输入用户名&quot; class&#x3D;&quot;form-control&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;!--表单中的表单元素组--&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label for&#x3D;&quot;password&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;密码：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;input id&#x3D;&quot;password&quot; placeholder&#x3D;&quot;请输入用户名&quot; class&#x3D;&quot;form-control&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;兴趣爱好：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                    &lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏                &lt;&#x2F;label&gt;                &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                    &lt;input type&#x3D;&quot;checkbox&quot;&gt;学习                &lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;请选择城市：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;select class&#x3D;&quot;form-control&quot;&gt;                    &lt;option&gt;上海&lt;&#x2F;option&gt;                    &lt;option&gt;长沙&lt;&#x2F;option&gt;                    &lt;option&gt;北京&lt;&#x2F;option&gt;                    &lt;option&gt;&lt;&#x2F;option&gt;                &lt;&#x2F;select&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;简介：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;textarea class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;textarea&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;div class&#x3D;&quot;col-md-8 col-xs-offset-5&quot;&gt;                &lt;input type&#x3D;&quot;submit&quot; class&#x3D;&quot;btn btn-primary&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;form&gt;&lt;&#x2F;div&gt;
内联表单 将表单的控件都在一行内显示form-inline
 注意label不会显示，存在的意义：如果没有为输入控件设置label标签，屏幕阅读器将无法正确识别。
12345678910111213141516171819202122&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;div class&#x3D;&quot;col-md-10 col-xs-offset-2&quot;&gt;        &lt;form class&#x3D;&quot;form-inline&quot;&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;label&gt;邮箱&lt;&#x2F;label&gt;                &lt;input type&#x3D;&quot;email&quot; class&#x3D;&quot;form-control&quot; placeholder&#x3D;&quot;请输入邮箱&quot;&#x2F;&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;label&gt;密码&lt;&#x2F;label&gt;                &lt;input type&#x3D;&quot;pwd&quot; class&#x3D;&quot;form-control&quot; placeholder&#x3D;&quot;请输入密码&quot;&#x2F;&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&#x2F;&gt;记住密码&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;button class&#x3D;&quot;btn btn-primary &quot;&gt;提交&lt;&#x2F;button&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;form&gt;    &lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
缩略图 缩略图在电商类的网站很常见，最常用的地方就是产品列表页面。缩略图的实现是配合网格系统一起使用。同时还可以让缩略图配合标题、描述内容，按钮等。
1234567891011121314151617&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;div class&#x3D;&quot;row&quot;&gt;        &lt;div class&#x3D;&quot;col-md-3&quot;&gt;            &lt;div class&#x3D;&quot;thumbnail&quot;&gt;                &lt;img src&#x3D;&quot;..&#x2F;resource&#x2F;img&#x2F;图片2.webp&quot; alt&#x3D;&quot;...&quot;&gt;                &lt;h3&gt;高圆圆&lt;&#x2F;h3&gt;                &lt;p&gt;出生于北京市，中国内地影视女演员、模特。&lt;&#x2F;p&gt;                &lt;button class&#x3D;&quot;btn btn-default&quot;&gt;                    &lt;span class&#x3D;&quot;glyphicon glyphicon-heart&quot;&gt;&lt;&#x2F;span&gt;喜欢                &lt;&#x2F;button&gt;                &lt;button class&#x3D;&quot;btn btn-info&quot;&gt;                    &lt;span class&#x3D;&quot;glyphicon glyphicon-pencil&quot;&gt;&lt;&#x2F;span&gt;评论                &lt;&#x2F;button&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
面板 默认的 .panel组件所做的只是设置基本的边框（border）和内补（padding）来包含内容。
 .panel-default：默认样式
 .panel-heading：面板头
 .panel-body：面板主体内容
Bootstrap插件导航 使用下拉与按钮组合可以制作导航
 要点:
1
标签式导航123456789&lt;p&gt;标签式的导航菜单&lt;&#x2F;p&gt;&lt;ul class&#x3D;&quot;nav nav-tabs&quot;&gt;  &lt;li class&#x3D;&quot;active&quot;&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Home&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;SVN&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;iOS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;VB.Net&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Java&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;PHP&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
胶囊式导航123456789&lt;p&gt;基本的胶囊式导航菜单&lt;&#x2F;p&gt;&lt;ul class&#x3D;&quot;nav nav-pills&quot;&gt;	&lt;li class&#x3D;&quot;active&quot;&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Home&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;SVN&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;iOS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;VB.Net&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Java&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;PHP&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
分页 分页随处可见，分为页码导航和翻页导航
 页码导航：ul标签上加pagination [pagination-lg | pagination-sm]
 翻页导航：ul标签上加pager
分页123456789&lt;ul class&#x3D;&quot;pagination&quot;&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;&amp;laquo;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;&amp;raquo;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
翻页1234&lt;ul class&#x3D;&quot;pager&quot;&gt;    &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Previous&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;    &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Next&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
下拉菜单1234567891011121314151617181920212223&lt;!--1、使用一个类名为dropdown 或btn-group的div 包裹整个下拉框: &lt;div class&#x3D;&quot;dropdown&quot;&gt;&lt;&#x2F;div&gt;2、默认向下dropdown，向上弹起加入 . dropup 即可3、使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性&lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default dropdown-toggle&quot; data-toggle&#x3D;&quot;dropdown&quot;&gt;&lt;&#x2F;button&gt;4、在button中 使用font 制作下拉箭头：&lt;span class&#x3D;&quot;caret&quot;&gt;&lt;&#x2F;span&gt;5、下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu6、分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能7、分组标题: li 添加类名 “dropdown-header” 来实现分组的功能8、对齐方式:	1)、dropdown-menu-left  左对齐 默认样式	2)、dropdown-menu-right   右对齐9、激活状态（.active）和禁用状态（.disabled）--&gt;
 在使用Bootstrap框架的下拉菜单时，必须使用两个js
1234&lt;!-- 如果要使用Bootstrap的js插件，必须先调入jQuery --&gt;&lt;script src&#x3D;&quot;js&#x2F;jquery-3.4.1.js&quot;&gt;&lt;&#x2F;script&gt;&lt;!-- 包括所有bootstrap的js插件或者可以根据需要使用的js插件调用　--&gt;&lt;script src&#x3D;&quot;js&#x2F;bootstrap.min.js&quot;&gt;&lt;&#x2F;script&gt;
12345678910111213141516171819202122232425262728&lt;!--使用一个类名为dropdown,默认向下dropdown，向上弹起加入 . dropup 即可--&gt;&lt;div class&#x3D;&quot;dropdown &quot;&gt;    &lt;!--使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性--&gt;    &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default dropdown-toggle&quot; data-toggle&#x3D;&quot;dropdown&quot;&gt;        喜欢频道 &lt;span class&#x3D;&quot;caret&quot;&gt;&lt;&#x2F;span&gt;&lt;!--下拉箭头--&gt;    &lt;&#x2F;button&gt;    &lt;!--下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu--&gt;    &lt;ul class&#x3D;&quot;dropdown-menu&quot;&gt;	 &lt;!--dropdown-menu-right右对齐--&gt;        &lt;!--分组标题: li 添加类名 “dropdown-header” 来实现分组的功能--&gt;        &lt;li class&#x3D;&quot;dropdown-header&quot;&gt;----科普----&lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;人与自然&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;!--分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能--&gt;        &lt;li class&#x3D;&quot;divider&quot;&gt;&lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;dropdown-header&quot;&gt;----搞笑----&lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;欢乐喜剧人&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;快乐大本营&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;divider&quot;&gt;&lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;disabled&quot;&gt;	&lt;!--禁用状态--&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;生活大爆炸&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;    &lt;&#x2F;ul&gt;&lt;&#x2F;div&gt;
模态框 模态框（Modal）是覆盖在父窗体上的子窗体。通常，目的是显示来自一个单独的源的内容，可以在不离开父窗体的情况下有一些互动。子窗体可提供信息、交互等。
用法1、通过 data 属性：在控制器元素（比如按钮或者链接）上设置属性 data-toggle&#x3D;“modal”，同时设置 data-target&#x3D;”#identifier” 或 href&#x3D;”#identifier” 来指定要切换的特定的模态框（带有 id&#x3D;“identifier”）。
2、通过 JavaScript：使用这种技术，可以通过 JavaScript 来调用带有 id&#x3D;“identifier” 的模态框：
1$(&#39;#identifier&#39;).modal(options);
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768&lt;!DOCTYPE html&gt;&lt;html&gt;    &lt;head&gt;        &lt;meta charset&#x3D;&quot;utf-8&quot;&gt;        &lt;title&gt;Bootstrap 实例 - 模态框（Modal）插件&lt;&#x2F;title&gt;        &lt;link rel&#x3D;&quot;stylesheet&quot; href&#x3D;&quot;..&#x2F;resource&#x2F;bootstrap&#x2F;css&#x2F;bootstrap.css&quot;&gt;        &lt;!--如果需要使用bootstrap插件需要先引入jQuery--&gt;        &lt;script src&#x3D;&quot;..&#x2F;resource&#x2F;js&#x2F;jquery-3.6.0.js&quot;&gt;&lt;&#x2F;script&gt;        &lt;!--虽有的bootstrap的js文件需要都是先要有jQuery文件--&gt;        &lt;script src&#x3D;&quot;..&#x2F;resource&#x2F;bootstrap&#x2F;js&#x2F;bootstrap.js&quot;&gt;&lt;&#x2F;script&gt;    &lt;&#x2F;head&gt;    &lt;body&gt;        &lt;h2&gt;创建模态框（Modal）&lt;&#x2F;h2&gt;        &lt;!-- 按钮触发模态框 --&gt;        &lt;button class&#x3D;&quot;btn btn-primary btn-lg&quot; data-toggle&#x3D;&quot;modal&quot; data-target&#x3D;&quot;#myModal&quot;&gt;            开始演示模态框        &lt;&#x2F;button&gt;        &lt;!-- 模态框（Modal） --&gt;        &lt;div class&#x3D;&quot;modal fade&quot; id&#x3D;&quot;myModal&quot; tabindex&#x3D;&quot;-1&quot; role&#x3D;&quot;dialog&quot; aria-labelledby&#x3D;&quot;myModalLabel&quot;             aria-hidden&#x3D;&quot;true&quot;&gt;            &lt;div class&#x3D;&quot;modal-dialog&quot;&gt;                &lt;div class&#x3D;&quot;modal-content&quot;&gt;                    &lt;div class&#x3D;&quot;modal-header&quot;&gt;                        &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;close&quot; data-dismiss&#x3D;&quot;modal&quot; aria-hidden&#x3D;&quot;true&quot;&gt;                            &amp;times;                        &lt;&#x2F;button&gt;                        &lt;h2 class&#x3D;&quot;text-center&quot;&gt;用户表信息&lt;&#x2F;h2&gt;                    &lt;&#x2F;div&gt;                    &lt;form id&#x3D;&quot;user-form&quot; action&#x3D;&quot;..&#x2F;2、常用样式&#x2F;9、按钮.html&quot; class&#x3D;&quot;form-horizontal &quot; role&#x3D;&quot;form&quot;&gt;                        &lt;div&gt;                            &lt;!--表单中的表单元素组--&gt;                            &lt;div class&#x3D;&quot;form-group&quot;&gt;                                &lt;label for&#x3D;&quot;username&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;用户名：&lt;&#x2F;label&gt;                                &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                                    &lt;input id&#x3D;&quot;username&quot; placeholder&#x3D;&quot;请输入用户名&quot; name&#x3D;&quot;username&quot; class&#x3D;&quot;form-control&quot;&gt;                                &lt;&#x2F;div&gt;                            &lt;&#x2F;div&gt;                            &lt;!--表单中的表单元素组--&gt;                            &lt;div class&#x3D;&quot;form-group&quot;&gt;                                &lt;label for&#x3D;&quot;password&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;密码：&lt;&#x2F;label&gt;                                &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                                    &lt;input id&#x3D;&quot;password&quot; type&#x3D;&quot;password&quot; name&#x3D;&quot;password&quot; placeholder&#x3D;&quot;请输入用户名&quot;                                           class&#x3D;&quot;form-control&quot;&gt;                                &lt;&#x2F;div&gt;                            &lt;&#x2F;div&gt;                                                    &lt;&#x2F;div&gt;                        &lt;div class&#x3D;&quot;modal-footer&quot;&gt;                            &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default&quot; data-dismiss&#x3D;&quot;modal&quot;&gt;关闭                            &lt;&#x2F;button&gt;                            &lt;button type&#x3D;&quot;submit&quot; class&#x3D;&quot;btn btn-primary&quot; id&#x3D;&quot;submit_btn&quot;&gt;                                提交更改                            &lt;&#x2F;button&gt;                        &lt;&#x2F;div&gt;                    &lt;&#x2F;form&gt;                &lt;&#x2F;div&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;body&gt;&lt;&#x2F;html&gt;
方法



方法
描述
实例




Toggle: .modal(‘toggle’)
手动切换模态框。
$(&#39;#identifier&#39;).modal(&#39;toggle&#39;);


Show: .modal(‘show’)
手动打开模态框。
$(&#39;#identifier&#39;).modal(&#39;show&#39;);


Hide: .modal(‘hide’)
手动隐藏模态框。
$(&#39;#identifier&#39;).modal(&#39;hide&#39;);





</span></a><ol class="toc-child"><li class="toc-item toc-level-6"><a class="toc-link"><span class="toc-text">，只不过Bootstrap覆盖了默认的样式，使其在所有浏览器中的效果都一样
为了让非标题标签的和标题标签使用相同的样式，还特意定义了h1—-h6里六个类名，同时使用乐意紧跟着一行小的副标题或使用 .small
1234567&lt;h1&gt;标题1    &lt;small&gt;副标题&lt;&#x2F;small&gt;&lt;&#x2F;h1&gt;&lt;h2&gt;标题2    &lt;span class&#x3D;&quot;small&quot;&gt;我是副标题，加了small类属性，有了副标题的效果&lt;&#x2F;span&gt;&lt;&#x2F;h2&gt;&lt;div class&#x3D;&quot;h1&quot;&gt;我是div，使用了Bootstrap有了h1标签的效果&lt;&#x2F;div&gt;
段落 段落是排版中另一个重要元素之一。
通过.lead 来突出强调内容(其作用就是增大文本字号，加粗文本，而且对行高和margin也做相应的处理。可以使用以下标签给文本做突出样式处理：
1234567891011121314151617        &lt;!--		使用lead         小号字： &lt;small&gt;         加粗： &lt;b&gt; &lt;strong&gt;         斜体：&lt;i&gt;  &lt;em&gt;        --&gt;&lt;p class&#x3D;&quot;lead&quot;&gt;    &lt;b&gt;通过.lead&lt;&#x2F;b&gt;     来突出强调内容(     &lt;small&gt;其作用就是增大文本字号，&lt;&#x2F;small&gt;    &lt;strong&gt;加粗文本&lt;&#x2F;strong&gt;，    &lt;i&gt;而且&lt;&#x2F;i&gt;	对行高和    &lt;em&gt;margin&lt;&#x2F;em&gt;    也做相应的处理。可以使用以下标签给文本做突出样式处理：&lt;&#x2F;p&gt;
强调 定义了一套类名，这里称其为强调类名，这些强调类都是通过字体颜色来表示强调，具本说明如下：
123456789101112131415&lt;!--.text-muted：提示，使用浅灰色（#999）.text-primary：主要，使用蓝色（#428bca）.text-success：成功，使用浅绿色(#3c763d).text-info：通知信息，使用浅蓝色（#31708f）.text-warning：警告，使用黄色（#8a6d3b）.text-danger：危险，使用褐色（#a94442）--&gt;&lt;div class&#x3D;&quot;text-muted&quot;&gt;提示效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-primary&quot;&gt;主要效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-success&quot;&gt;成功效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-info&quot;&gt;信息效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-warning&quot;&gt;警告效果&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;text-danger&quot;&gt;危险效果&lt;&#x2F;div&gt;
对齐效果1、 在CSS中常常使用text-align来实现文本的对齐风格的设置。
 2、为了简化操作，方便使用，Bootstrap通过定义四个类名来控制文本的对齐风格：.text-left：左对齐 .text-center：居中对齐 .text-right：右对齐 .text-justify：两端对齐。
3、 其中主要有四种风格：
1234567891011121314&lt;!--左对齐，取值：text-left ;居中对齐，取值：text-center;右对齐，取值：text-right ;两端对齐，取值：text-justify。--&gt;&lt;p class&#x3D;&quot;text-left&quot;&gt;我居左&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-center&quot;&gt;我居中&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-right&quot;&gt;我居右&lt;&#x2F;p&gt;&lt;p class&#x3D;&quot;text-justify&quot;&gt;    网格系统的实现原理非常简单，仅仅是通过定义容器大小，平分12份(也有平分成24份或32份，但12份是最常见的)，    再调整内外边距，最后结合媒体查询，就制作出了强大的响应式网格系统。Bootstrap框架中的网格系统就是将容器平分成12份&lt;&#x2F;p&gt;
列表在HTML中，列表有如下三种

无序列表：（   ...   ）
有序列表：（   ...   ）
定义列表：（   ...    ...   ）

&#x3D;&#x3D;去点列表&#x3D;&#x3D;
1234&lt;ul class&#x3D;&quot;list-unstyled&quot;&gt;    &lt;li&gt;无序项目列表一&lt;&#x2F;li&gt;	&lt;li&gt;无序项目列表二&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
&#x3D;&#x3D;内联列表&#x3D;&#x3D;
 class&#x3D;“list-inline”，把垂直列表换成水平列表，而且去掉项目符号（编号），保持水平显示。也可以说内联列表就是为制作水平导航而生。
12345&lt;ul class&#x3D;&quot;list-inline&quot;&gt;	&lt;li&gt;首页&lt;&#x2F;li&gt;	&lt;li&gt;java学院&lt;&#x2F;li&gt;	&lt;li&gt;在线课堂&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
&#x3D;&#x3D;定义列表&#x3D;&#x3D;
 在原有的基础加入了一些样式，使用样式 class&#x3D;“dl-horizontal” 制作水平定义列表 : 当标题宽度超过160px时，将会显示三个省略号。
123456789101112&lt;dl&gt;	&lt;dt&gt;HTML&lt;&#x2F;dt&gt;	&lt;dd&gt;超文本标记语言&lt;&#x2F;dd&gt;	&lt;dt&gt;CSS&lt;&#x2F;dt&gt;	&lt;dd&gt;层叠样式表是一种样式表语言&lt;&#x2F;dd&gt;&lt;&#x2F;dl&gt;&lt;dl class&#x3D;&quot;dl-horizontal&quot;&gt;    &lt;dt&gt;HTML 超文本标记语言&lt;&#x2F;dt&gt;    &lt;dd&gt;HTML称为超文本标记语言，是一种标识性的语言。&lt;&#x2F;dd&gt;		       &lt;dt&gt;测试标题不能超过160px的宽度,否则2个点&lt;&#x2F;dt&gt;    &lt;dd&gt;我在写一个水平定义列表的效果，我在写一个水平定义列表的效果。&lt;&#x2F;dd&gt;&lt;&#x2F;dl&gt;
代码 一般在个人博客上使用的较为频繁，用于显示代码的风格。在Bootstrap主要提供了三种代码风格：
（1）使用&lt;code&gt;&lt;&#x2F;code&gt;来显示单行内联代码
（2）使用&lt;pre&gt;&lt;&#x2F;pre&gt;来显示多行代码
​            样式： 样式：pre-scrollable (height,max-height高度固定,为340px,超过存在滚动条)
（3）使用&lt;kbd&gt;&lt;&#x2F;kbd&gt;来显示用户输入代码,如快捷键
&#x3D;&#x3D;单行代码&#x3D;&#x3D;
12 &lt;!--单行代码--&gt;&lt;code&gt;public void main(){ ... }&lt;&#x2F;code&gt;
&#x3D;&#x3D;多行代码块&#x3D;&#x3D;
123456789101112131415161718192021222324252627282930313233        &lt;!--多行代码--&gt;        &lt;pre&gt;public String testFunction() {    System.out.println(&quot;控制器中的方法执行了&quot;);    return &quot;hello&quot;;}        &lt;&#x2F;pre&gt;        &lt;!--            显示html标签的代码需要适应字符实体            小于号（&lt;）要使用硬编码“&lt;”来替代，大于号(&gt;)使用“&gt;”来替代        --&gt;        &lt;pre&gt;			&lt;ul&gt;				&lt;li&gt;测试实体符&lt;&#x2F;li&gt;			&lt;&#x2F;ul&gt;		&lt;&#x2F;pre&gt;        &lt;!-- 当高度超过，会存在滚动条 --&gt;        &lt;pre class&#x3D;&quot;pre-scrollable&quot;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;				...........&lt;br&#x2F;&gt;		&lt;&#x2F;pre&gt;
&#x3D;&#x3D;快捷键&#x3D;&#x3D;
12&lt;!--显示高亮词--&gt;保存使用：&lt;kbd&gt;ctrl&lt;&#x2F;kbd&gt;+&lt;kbd&gt;s&lt;&#x2F;kbd&gt;
表格&#x3D;&#x3D;表格样式&#x3D;&#x3D;
 Bootstrap为表格提供了1种基础样式和4种附加样式以及1个支持响应式的表格。在使用Bootstrap的表格过程中，只需要添加对应的类名就可以得到不同的表格风格：
&#x3D;&#x3D;基础样式&#x3D;&#x3D;
1、基础表格
&#x3D;&#x3D;附加样式&#x3D;&#x3D;
1234567&lt;!--table：table-striped：斑马线表格table-bordered：带边框的表格table-hover：鼠标悬停高亮的表格table-condensed：紧凑型表格，单元格没内距或者内距较其他表格的内距小--&gt;
1&lt;table class&#x3D;&quot;table table-striped table-bordered table-hover table-condensed&quot;&gt;&lt;&#x2F;table&gt;
&#x3D;&#x3D;&lt;tr&gt;、&lt;th&gt;、&lt;td&gt;样式&#x3D;&#x3D;
 提供了五种不同的类名，每种类名控制了行的不同背景颜色

123456789101112131415161718192021222324252627&lt;table class&#x3D;&quot;table table-striped table-bordered table-hover table-condensed&quot;&gt;    &lt;tr class&#x3D;&quot;active&quot;&gt;        &lt;th &gt;JavaSE&lt;&#x2F;th&gt;        &lt;th&gt;数据库&lt;&#x2F;th&gt;        &lt;th&gt;JavaScript&lt;&#x2F;th&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;success&quot;&gt;        &lt;td&gt;面向对象&lt;&#x2F;td&gt;        &lt;td&gt;oracle&lt;&#x2F;td&gt;        &lt;td&gt;json&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;info&quot;&gt;        &lt;td&gt;数组&lt;&#x2F;td&gt;        &lt;td&gt;mysql&lt;&#x2F;td&gt;        &lt;td&gt;ajax&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;warning&quot;&gt;        &lt;td&gt;Spring&lt;&#x2F;td&gt;        &lt;td&gt;Habitat&lt;&#x2F;td&gt;        &lt;td&gt;SpringMVC&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;    &lt;tr class&#x3D;&quot;danger&quot;&gt;        &lt;td&gt;SpringMVC&lt;&#x2F;td&gt;        &lt;td&gt;MySqL-plus&lt;&#x2F;td&gt;        &lt;td&gt;Node.js&lt;&#x2F;td&gt;    &lt;&#x2F;tr&gt;&lt;&#x2F;table&gt;
表单 表单主要功能是用来与用户做交流的一个网页控件，良好的表单设计能够让网页与用户更好的沟通。表单中常见的元素主要包括：文本输入框、下拉选择框、单选按钮、复选按钮、文本域和按钮等。
表单控件输入框 text1234567891011&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;input type&#x3D;&quot;text&quot; class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;input type&#x3D;&quot;text&quot; class&#x3D;&quot;form-control input-sm&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
下拉选择框 select 多行选择设置：multiple&#x3D;“multiple”
1234567891011121314151617181920212223242526&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-2&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;label&gt;            请选择城市：            &lt;select class&#x3D;&quot;form-control&quot;&gt;                &lt;option&gt;上海&lt;&#x2F;option&gt;                &lt;option&gt;长沙&lt;&#x2F;option&gt;                &lt;option&gt;北京&lt;&#x2F;option&gt;                &lt;option&gt;&lt;&#x2F;option&gt;            &lt;&#x2F;select&gt;        &lt;&#x2F;label&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;label&gt;            请选择城市：            &lt;select class&#x3D;&quot;form-control&quot; multiple&#x3D;&quot;multiple&quot;&gt;                &lt;option&gt;上海&lt;&#x2F;option&gt;                &lt;option&gt;长沙&lt;&#x2F;option&gt;                &lt;option&gt;北京&lt;&#x2F;option&gt;                &lt;option&gt;&lt;&#x2F;option&gt;            &lt;&#x2F;select&gt;        &lt;&#x2F;label&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-2&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
文本域 textarea1234567&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;textarea class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;textarea&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
复选框 checkbox 垂直显示： .checkbox
 水平显示： .checkbox-inline
1234567891011121314151617181920212223242526&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;!-- 垂直显示 --&gt;        &lt;div&gt;            &lt;div class&#x3D;&quot;checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&gt;学习&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;hr&#x2F;&gt;        &lt;!-- 水平显示 --&gt;        &lt;div&gt;            &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                &lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏            &lt;&#x2F;label&gt;            &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                &lt;input type&#x3D;&quot;checkbox&quot;&gt;学习            &lt;&#x2F;label&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
复选框 checkbox垂直显示：.checkbox
水平显示： .checkbox-inline
12345678910111213141516171819202122232425&lt;div class&#x3D;&quot;row&quot;&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;        &lt;!-- 垂直显示 --&gt;        &lt;div&gt;            &lt;div class&#x3D;&quot;radio&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;radio&quot;&gt;男&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;radio&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;radio&quot;&gt;女&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;hr&#x2F;&gt;        &lt;!-- 水平显示 --&gt;        &lt;div&gt;            &lt;label class&#x3D;&quot;radio-inline&quot;&gt;                &lt;input type&#x3D;&quot;radio&quot;&gt;男            &lt;&#x2F;label&gt;            &lt;label class&#x3D;&quot;radio-inline&quot;&gt;                &lt;input type&#x3D;&quot;radio&quot;&gt;女            &lt;&#x2F;label&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;    &lt;div class&#x3D;&quot;col-md-4&quot;&gt;&lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
按钮1、使用 button 实现

基础样式： btn    

附加样式：btn-primary btn-info btn-success btn-warning btn-danger btn-link btn-default


12345678&lt;button class&#x3D;&quot;btn&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-danger&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-info&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-success&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-default&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-warning&quot;&gt;按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-link&quot;&gt;按钮&lt;&#x2F;button&gt;
2、多标签支持：使 a标签 div标签 等制作按钮
123&lt;a href&#x3D;&quot;#&quot; class&#x3D;&quot;btn btn-info&quot;&gt;a标签按钮&lt;&#x2F;a&gt;&lt;span class&#x3D;&quot;btn btn-success&quot;&gt;span标签按钮&lt;&#x2F;span&gt;&lt;div class&#x3D;&quot;btn btn-warning&quot;&gt;div标签按钮&lt;&#x2F;div&gt;
3、按钮大小
 使用 .btn-lg、.btn-sm 或 .btn-xs 就可以获得不同尺寸的按钮
1234&lt;button class&#x3D;&quot;btn btn-primary btn-xs&quot;&gt;超小按钮.btn-xs&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary btn-sm&quot;&gt;小型按钮.btn-sm&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary&quot;&gt;正常按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-primary btn-lg&quot;&gt;大型按钮.btn-lg&lt;&#x2F;button&gt;
4、按钮禁用

方法1：在标签中添加disabled属性&#x3D;&#x3D;样式也改变，按钮点击也没有作用了&#x3D;&#x3D;
方法2：在元素标签中添加类名”disabled” &#x3D;&#x3D;该禁用只是样式上禁用，实际按钮还能使用&#x3D;&#x3D;
在class属性中添加disabled只是样式上禁用了，并不是真正的禁用了此按钮！

1234567&lt;button class&#x3D;&quot;btn btn-danger&quot; disabled&#x3D;&quot;disabled&quot; onclick&#x3D;&quot;a()&quot;&gt;禁用按钮&lt;&#x2F;button&gt;&lt;button class&#x3D;&quot;btn btn-danger disabled&quot; onclick&#x3D;&quot;a()&quot;&gt;禁用按钮&lt;&#x2F;button&gt;&lt;script&gt;    function a(){        alert(&quot;123&quot;)    }&lt;&#x2F;script&gt;
表单布局 基本的表单结构是 Bootstrap 自带的，个别的表单控件自动接收一些全局样式。
下面列出了创建基本表单的步骤：

向父&lt;from&gt;元素添加 role&#x3D;“form”。
把标签和控件放在一个带有 class.form-group的&lt;div&gt;中。这是获取最佳间距所必需的。
向所有的文本元素 &lt;input&gt;、&lt;textarea&gt;和&lt;select&gt;添加 class &#x3D;“form-control” 。

水平表单 同一行显示form-horizontal
 配合Bootstrap框架的网格系统
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;form action&#x3D;&quot;&quot; class&#x3D;&quot;form-horizontal &quot; role&#x3D;&quot;form&quot;&gt;        &lt;!--表单中的表单元素组--&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;h2 class&#x3D;&quot;text-center&quot;&gt;用户表信息&lt;&#x2F;h2&gt;            &lt;label for&#x3D;&quot;username&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;用户名：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;input id&#x3D;&quot;username&quot; placeholder&#x3D;&quot;请输入用户名&quot; class&#x3D;&quot;form-control&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;!--表单中的表单元素组--&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label for&#x3D;&quot;password&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;密码：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;input id&#x3D;&quot;password&quot; placeholder&#x3D;&quot;请输入用户名&quot; class&#x3D;&quot;form-control&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;兴趣爱好：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                    &lt;input type&#x3D;&quot;checkbox&quot;&gt;游戏                &lt;&#x2F;label&gt;                &lt;label class&#x3D;&quot;checkbox-inline&quot;&gt;                    &lt;input type&#x3D;&quot;checkbox&quot;&gt;学习                &lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;请选择城市：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;select class&#x3D;&quot;form-control&quot;&gt;                    &lt;option&gt;上海&lt;&#x2F;option&gt;                    &lt;option&gt;长沙&lt;&#x2F;option&gt;                    &lt;option&gt;北京&lt;&#x2F;option&gt;                    &lt;option&gt;&lt;&#x2F;option&gt;                &lt;&#x2F;select&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;label class&#x3D;&quot;control-label col-md-2&quot;&gt;简介：&lt;&#x2F;label&gt;            &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                &lt;textarea class&#x3D;&quot;form-control&quot;&gt;&lt;&#x2F;textarea&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;        &lt;div class&#x3D;&quot;form-group&quot;&gt;            &lt;div class&#x3D;&quot;col-md-8 col-xs-offset-5&quot;&gt;                &lt;input type&#x3D;&quot;submit&quot; class&#x3D;&quot;btn btn-primary&quot;&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;form&gt;&lt;&#x2F;div&gt;
内联表单 将表单的控件都在一行内显示form-inline
 注意label不会显示，存在的意义：如果没有为输入控件设置label标签，屏幕阅读器将无法正确识别。
12345678910111213141516171819202122&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;div class&#x3D;&quot;col-md-10 col-xs-offset-2&quot;&gt;        &lt;form class&#x3D;&quot;form-inline&quot;&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;label&gt;邮箱&lt;&#x2F;label&gt;                &lt;input type&#x3D;&quot;email&quot; class&#x3D;&quot;form-control&quot; placeholder&#x3D;&quot;请输入邮箱&quot;&#x2F;&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;label&gt;密码&lt;&#x2F;label&gt;                &lt;input type&#x3D;&quot;pwd&quot; class&#x3D;&quot;form-control&quot; placeholder&#x3D;&quot;请输入密码&quot;&#x2F;&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group checkbox&quot;&gt;                &lt;label&gt;&lt;input type&#x3D;&quot;checkbox&quot;&#x2F;&gt;记住密码&lt;&#x2F;label&gt;            &lt;&#x2F;div&gt;            &lt;div class&#x3D;&quot;form-group&quot;&gt;                &lt;button class&#x3D;&quot;btn btn-primary &quot;&gt;提交&lt;&#x2F;button&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;form&gt;    &lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
缩略图 缩略图在电商类的网站很常见，最常用的地方就是产品列表页面。缩略图的实现是配合网格系统一起使用。同时还可以让缩略图配合标题、描述内容，按钮等。
1234567891011121314151617&lt;div class&#x3D;&quot;container&quot;&gt;    &lt;div class&#x3D;&quot;row&quot;&gt;        &lt;div class&#x3D;&quot;col-md-3&quot;&gt;            &lt;div class&#x3D;&quot;thumbnail&quot;&gt;                &lt;img src&#x3D;&quot;..&#x2F;resource&#x2F;img&#x2F;图片2.webp&quot; alt&#x3D;&quot;...&quot;&gt;                &lt;h3&gt;高圆圆&lt;&#x2F;h3&gt;                &lt;p&gt;出生于北京市，中国内地影视女演员、模特。&lt;&#x2F;p&gt;                &lt;button class&#x3D;&quot;btn btn-default&quot;&gt;                    &lt;span class&#x3D;&quot;glyphicon glyphicon-heart&quot;&gt;&lt;&#x2F;span&gt;喜欢                &lt;&#x2F;button&gt;                &lt;button class&#x3D;&quot;btn btn-info&quot;&gt;                    &lt;span class&#x3D;&quot;glyphicon glyphicon-pencil&quot;&gt;&lt;&#x2F;span&gt;评论                &lt;&#x2F;button&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;div&gt;&lt;&#x2F;div&gt;
面板 默认的 .panel组件所做的只是设置基本的边框（border）和内补（padding）来包含内容。
 .panel-default：默认样式
 .panel-heading：面板头
 .panel-body：面板主体内容
Bootstrap插件导航 使用下拉与按钮组合可以制作导航
 要点:
1
标签式导航123456789&lt;p&gt;标签式的导航菜单&lt;&#x2F;p&gt;&lt;ul class&#x3D;&quot;nav nav-tabs&quot;&gt;  &lt;li class&#x3D;&quot;active&quot;&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Home&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;SVN&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;iOS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;VB.Net&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Java&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;  &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;PHP&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
胶囊式导航123456789&lt;p&gt;基本的胶囊式导航菜单&lt;&#x2F;p&gt;&lt;ul class&#x3D;&quot;nav nav-pills&quot;&gt;	&lt;li class&#x3D;&quot;active&quot;&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Home&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;SVN&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;iOS&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;VB.Net&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Java&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;PHP&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
分页 分页随处可见，分为页码导航和翻页导航
 页码导航：ul标签上加pagination [pagination-lg | pagination-sm]
 翻页导航：ul标签上加pager
分页123456789&lt;ul class&#x3D;&quot;pagination&quot;&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;&amp;laquo;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;2&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;3&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;4&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;5&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;	&lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;&amp;raquo;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
翻页1234&lt;ul class&#x3D;&quot;pager&quot;&gt;    &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Previous&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;    &lt;li&gt;&lt;a href&#x3D;&quot;#&quot;&gt;Next&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;&lt;&#x2F;ul&gt;
下拉菜单1234567891011121314151617181920212223&lt;!--1、使用一个类名为dropdown 或btn-group的div 包裹整个下拉框: &lt;div class&#x3D;&quot;dropdown&quot;&gt;&lt;&#x2F;div&gt;2、默认向下dropdown，向上弹起加入 . dropup 即可3、使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性&lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default dropdown-toggle&quot; data-toggle&#x3D;&quot;dropdown&quot;&gt;&lt;&#x2F;button&gt;4、在button中 使用font 制作下拉箭头：&lt;span class&#x3D;&quot;caret&quot;&gt;&lt;&#x2F;span&gt;5、下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu6、分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能7、分组标题: li 添加类名 “dropdown-header” 来实现分组的功能8、对齐方式:	1)、dropdown-menu-left  左对齐 默认样式	2)、dropdown-menu-right   右对齐9、激活状态（.active）和禁用状态（.disabled）--&gt;
 在使用Bootstrap框架的下拉菜单时，必须使用两个js
1234&lt;!-- 如果要使用Bootstrap的js插件，必须先调入jQuery --&gt;&lt;script src&#x3D;&quot;js&#x2F;jquery-3.4.1.js&quot;&gt;&lt;&#x2F;script&gt;&lt;!-- 包括所有bootstrap的js插件或者可以根据需要使用的js插件调用　--&gt;&lt;script src&#x3D;&quot;js&#x2F;bootstrap.min.js&quot;&gt;&lt;&#x2F;script&gt;
12345678910111213141516171819202122232425262728&lt;!--使用一个类名为dropdown,默认向下dropdown，向上弹起加入 . dropup 即可--&gt;&lt;div class&#x3D;&quot;dropdown &quot;&gt;    &lt;!--使用button作为父菜单，使用类名: dropdown-toggle 和自定义data-toggle属性--&gt;    &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default dropdown-toggle&quot; data-toggle&#x3D;&quot;dropdown&quot;&gt;        喜欢频道 &lt;span class&#x3D;&quot;caret&quot;&gt;&lt;&#x2F;span&gt;&lt;!--下拉箭头--&gt;    &lt;&#x2F;button&gt;    &lt;!--下拉菜单项使用一个ul列表，并且定义一个类名为“dropdown-menu--&gt;    &lt;ul class&#x3D;&quot;dropdown-menu&quot;&gt;	 &lt;!--dropdown-menu-right右对齐--&gt;        &lt;!--分组标题: li 添加类名 “dropdown-header” 来实现分组的功能--&gt;        &lt;li class&#x3D;&quot;dropdown-header&quot;&gt;----科普----&lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;人与自然&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;!--分组分割线: &lt;li&gt;添加类名“divider”来实现添加下拉分隔线的功能--&gt;        &lt;li class&#x3D;&quot;divider&quot;&gt;&lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;dropdown-header&quot;&gt;----搞笑----&lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;欢乐喜剧人&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;li&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;快乐大本营&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;divider&quot;&gt;&lt;&#x2F;li&gt;        &lt;li class&#x3D;&quot;disabled&quot;&gt;	&lt;!--禁用状态--&gt;            &lt;a href&#x3D;&quot;#&quot;&gt;生活大爆炸&lt;&#x2F;a&gt;        &lt;&#x2F;li&gt;    &lt;&#x2F;ul&gt;&lt;&#x2F;div&gt;
模态框 模态框（Modal）是覆盖在父窗体上的子窗体。通常，目的是显示来自一个单独的源的内容，可以在不离开父窗体的情况下有一些互动。子窗体可提供信息、交互等。
用法1、通过 data 属性：在控制器元素（比如按钮或者链接）上设置属性 data-toggle&#x3D;“modal”，同时设置 data-target&#x3D;”#identifier” 或 href&#x3D;”#identifier” 来指定要切换的特定的模态框（带有 id&#x3D;“identifier”）。
2、通过 JavaScript：使用这种技术，可以通过 JavaScript 来调用带有 id&#x3D;“identifier” 的模态框：
1$(&#39;#identifier&#39;).modal(options);
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768&lt;!DOCTYPE html&gt;&lt;html&gt;    &lt;head&gt;        &lt;meta charset&#x3D;&quot;utf-8&quot;&gt;        &lt;title&gt;Bootstrap 实例 - 模态框（Modal）插件&lt;&#x2F;title&gt;        &lt;link rel&#x3D;&quot;stylesheet&quot; href&#x3D;&quot;..&#x2F;resource&#x2F;bootstrap&#x2F;css&#x2F;bootstrap.css&quot;&gt;        &lt;!--如果需要使用bootstrap插件需要先引入jQuery--&gt;        &lt;script src&#x3D;&quot;..&#x2F;resource&#x2F;js&#x2F;jquery-3.6.0.js&quot;&gt;&lt;&#x2F;script&gt;        &lt;!--虽有的bootstrap的js文件需要都是先要有jQuery文件--&gt;        &lt;script src&#x3D;&quot;..&#x2F;resource&#x2F;bootstrap&#x2F;js&#x2F;bootstrap.js&quot;&gt;&lt;&#x2F;script&gt;    &lt;&#x2F;head&gt;    &lt;body&gt;        &lt;h2&gt;创建模态框（Modal）&lt;&#x2F;h2&gt;        &lt;!-- 按钮触发模态框 --&gt;        &lt;button class&#x3D;&quot;btn btn-primary btn-lg&quot; data-toggle&#x3D;&quot;modal&quot; data-target&#x3D;&quot;#myModal&quot;&gt;            开始演示模态框        &lt;&#x2F;button&gt;        &lt;!-- 模态框（Modal） --&gt;        &lt;div class&#x3D;&quot;modal fade&quot; id&#x3D;&quot;myModal&quot; tabindex&#x3D;&quot;-1&quot; role&#x3D;&quot;dialog&quot; aria-labelledby&#x3D;&quot;myModalLabel&quot;             aria-hidden&#x3D;&quot;true&quot;&gt;            &lt;div class&#x3D;&quot;modal-dialog&quot;&gt;                &lt;div class&#x3D;&quot;modal-content&quot;&gt;                    &lt;div class&#x3D;&quot;modal-header&quot;&gt;                        &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;close&quot; data-dismiss&#x3D;&quot;modal&quot; aria-hidden&#x3D;&quot;true&quot;&gt;                            &amp;times;                        &lt;&#x2F;button&gt;                        &lt;h2 class&#x3D;&quot;text-center&quot;&gt;用户表信息&lt;&#x2F;h2&gt;                    &lt;&#x2F;div&gt;                    &lt;form id&#x3D;&quot;user-form&quot; action&#x3D;&quot;..&#x2F;2、常用样式&#x2F;9、按钮.html&quot; class&#x3D;&quot;form-horizontal &quot; role&#x3D;&quot;form&quot;&gt;                        &lt;div&gt;                            &lt;!--表单中的表单元素组--&gt;                            &lt;div class&#x3D;&quot;form-group&quot;&gt;                                &lt;label for&#x3D;&quot;username&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;用户名：&lt;&#x2F;label&gt;                                &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                                    &lt;input id&#x3D;&quot;username&quot; placeholder&#x3D;&quot;请输入用户名&quot; name&#x3D;&quot;username&quot; class&#x3D;&quot;form-control&quot;&gt;                                &lt;&#x2F;div&gt;                            &lt;&#x2F;div&gt;                            &lt;!--表单中的表单元素组--&gt;                            &lt;div class&#x3D;&quot;form-group&quot;&gt;                                &lt;label for&#x3D;&quot;password&quot; class&#x3D;&quot;control-label col-md-2&quot;&gt;密码：&lt;&#x2F;label&gt;                                &lt;div class&#x3D;&quot;col-md-8&quot;&gt;                                    &lt;input id&#x3D;&quot;password&quot; type&#x3D;&quot;password&quot; name&#x3D;&quot;password&quot; placeholder&#x3D;&quot;请输入用户名&quot;                                           class&#x3D;&quot;form-control&quot;&gt;                                &lt;&#x2F;div&gt;                            &lt;&#x2F;div&gt;                                                    &lt;&#x2F;div&gt;                        &lt;div class&#x3D;&quot;modal-footer&quot;&gt;                            &lt;button type&#x3D;&quot;button&quot; class&#x3D;&quot;btn btn-default&quot; data-dismiss&#x3D;&quot;modal&quot;&gt;关闭                            &lt;&#x2F;button&gt;                            &lt;button type&#x3D;&quot;submit&quot; class&#x3D;&quot;btn btn-primary&quot; id&#x3D;&quot;submit_btn&quot;&gt;                                提交更改                            &lt;&#x2F;button&gt;                        &lt;&#x2F;div&gt;                    &lt;&#x2F;form&gt;                &lt;&#x2F;div&gt;            &lt;&#x2F;div&gt;        &lt;&#x2F;div&gt;    &lt;&#x2F;body&gt;&lt;&#x2F;html&gt;
方法



方法
描述
实例




Toggle: .modal(‘toggle’)
手动切换模态框。
$(&#39;#identifier&#39;).modal(&#39;toggle&#39;);


Show: .modal(‘show’)
手动打开模态框。
$(&#39;#identifier&#39;).modal(&#39;show&#39;);


Hide: .modal(‘hide’)
手动隐藏模态框。
$(&#39;#identifier&#39;).modal(&#39;hide&#39;);





</span></a></li></ol></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%AE%B5%E8%90%BD"><span class="toc-text">段落</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%BC%BA%E8%B0%83"><span class="toc-text">强调</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%AF%B9%E9%BD%90%E6%95%88%E6%9E%9C"><span class="toc-text">对齐效果</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E5%88%97%E8%A1%A8"><span class="toc-text">列表</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E4%BB%A3%E7%A0%81"><span class="toc-text">代码</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E8%A1%A8%E6%A0%BC"><span class="toc-text">表格</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%A1%A8%E5%8D%95"><span class="toc-text">表单</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E8%A1%A8%E5%8D%95%E6%8E%A7%E4%BB%B6"><span class="toc-text">表单控件</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E8%BE%93%E5%85%A5%E6%A1%86-text"><span class="toc-text">输入框 text</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E4%B8%8B%E6%8B%89%E9%80%89%E6%8B%A9%E6%A1%86-select"><span class="toc-text">下拉选择框 select</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E6%96%87%E6%9C%AC%E5%9F%9F-textarea"><span class="toc-text">文本域 textarea</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E5%A4%8D%E9%80%89%E6%A1%86-checkbox"><span class="toc-text">复选框 checkbox</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E5%A4%8D%E9%80%89%E6%A1%86-checkbox-1"><span class="toc-text">复选框 checkbox</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E6%8C%89%E9%92%AE"><span class="toc-text">按钮</span></a></li></ol></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E8%A1%A8%E5%8D%95%E5%B8%83%E5%B1%80"><span class="toc-text">表单布局</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E6%B0%B4%E5%B9%B3%E8%A1%A8%E5%8D%95"><span class="toc-text">水平表单</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E5%86%85%E8%81%94%E8%A1%A8%E5%8D%95"><span class="toc-text">内联表单</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BC%A9%E7%95%A5%E5%9B%BE"><span class="toc-text">缩略图</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%9D%A2%E6%9D%BF"><span class="toc-text">面板</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Bootstrap%E6%8F%92%E4%BB%B6"><span class="toc-text">Bootstrap插件</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AF%BC%E8%88%AA"><span class="toc-text">导航</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%A0%87%E7%AD%BE%E5%BC%8F%E5%AF%BC%E8%88%AA"><span class="toc-text">标签式导航</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E8%83%B6%E5%9B%8A%E5%BC%8F%E5%AF%BC%E8%88%AA"><span class="toc-text">胶囊式导航</span></a></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%88%86%E9%A1%B5"><span class="toc-text">分页</span></a><ol class="toc-child"><li class="toc-item toc-level-5"><a class="toc-link" href="#%E5%88%86%E9%A1%B5-1"><span class="toc-text">分页</span></a></li><li class="toc-item toc-level-5"><a class="toc-link" href="#%E7%BF%BB%E9%A1%B5"><span class="toc-text">翻页</span></a></li></ol></li></ol></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%8B%E6%8B%89%E8%8F%9C%E5%8D%95"><span class="toc-text">下拉菜单</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%A8%A1%E6%80%81%E6%A1%86"><span class="toc-text">模态框</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E7%94%A8%E6%B3%95"><span class="toc-text">用法</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%96%B9%E6%B3%95"><span class="toc-text">方法</span></a></li></ol></li></ol></li></ol></li></ol></div></div></div></div></main><footer id="footer" style="background-color: transparent;"><div id="footer-wrap"><div id="ft"><div class="ft-item-1"><div class="t-top"><div class="t-t-l"><p class="ft-t t-l-t">格言🧬</p><div class="bg-ad"><div>再看看那个光点，它就在这里，这是家园，这是我们 —— 你所爱的每一个人，你认识的一个人，你听说过的每一个人，曾经有过的每一个人，都在它上面度过他们的一生✨</div><div class="btn-xz-box"><a class="btn-xz" target="_blank" rel="noopener" href="https://stellarium.org/">点击开启星辰之旅</a></div></div></div><div class="t-t-r"><p class="ft-t t-l-t">猜你想看💡</p><ul class="ft-links"><li><a href="/posts/eec9786.html">魔改指南</a><a href="/box/nav/">网址导航</a></li><li><a href="/social/link/">我的朋友</a><a href="/comments/">留点什么</a></li><li><a href="/personal/about/">关于作者</a><a href="/archives/">文章归档</a></li><li><a href="/categories/">文章分类</a><a href="/tags/">文章标签</a></li><li><a href="/box/Gallery/">我的画廊</a><a href="/personal/bb/">我的唠叨</a></li><li><a href="/site/time/">建设进程</a><a href="/site/census/">网站统计</a></li></ul></div></div></div><div class="ft-item-2"><p class="ft-t">推荐友链⌛</p><div class="ft-img-group"><div class="img-group-item"><a href="https://www.naste.top:1024/" title="XiaoFei🥝"><img src= "" data-lazy-src="https://www.naste.top:9000/images/cat.jpg" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div><div class="img-group-item"><a href="javascript:void(0)" title="广告位招租"><img src= "" data-lazy-src="https://www.naste.top:9000/webp/65307a5828af6790.webp" alt=""/></a></div></div></div></div><div class="copyright"><span><b>&copy;2022-2024</b></span><span><b>&nbsp;&nbsp;By XiaoFei🥝</b></span></div><div id="workboard"></div><p id="ghbdages"><a class="github-badge" target="_blank" href="https://hexo.io/" style="margin-inline:5px" title="博客框架为Hexo_v6.3.0"><img src= "" data-lazy-src="https://static.naste.top:1024/svg/blog/Frame-Hexo-blue.svg" alt=""/></a><a class="github-badge" target="_blank" href="https://butterfly.js.org/" style="margin-inline:5px" title="主题版本Butterfly_v4.3.1"><img src= "" data-lazy-src="https://static.naste.top:1024/svg/blog/Theme-Butterfly-6513df.svg" alt=""/></a><a class="github-badge" target="_blank" href="https://vercel.com/" style="margin-inline:5px" title="本站采用多线部署，主线路托管于Vercel"><img src= "" data-lazy-src="https://static.naste.top:1024/svg/blog/Hosted-Vercel-brightgreen.svg" alt=""/></a><a class="github-badge" target="_blank" href="https://user.51.la/" style="margin-inline:5px" title="本站数据分析得益于51la技术支持"><img src= "" data-lazy-src="https://static.naste.top:1024/svg/blog/Analytics-51la-3db1eb.svg" alt=""/></a><a class="github-badge" target="_blank" href="https://github.com/" style="margin-inline:5px" title="本网站源码由Github提供存储仓库"><img src= "" data-lazy-src=" https://static.naste.top:1024/svg/blog/Source-Github-d021d6.svg" alt=""/></a></p></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><a class="icon-V hidden" onclick="switchNightMode()" title="浅色和深色模式转换"><svg width="25" height="25" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button><button class="share" type="button" title="右键模式" onclick="changeMouseMode()"><i class="fas fa-mouse"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog right_side"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button class="share" type="button" title="分享链接" onclick="share()"><i class="fas fa-share-nodes"></i></button><a id="to_comment" href="#post-comment" title="直达评论"><i class="fas fa-comments"></i></a><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i><span id="percent">0<span>%</span></span></button><button id="go-down" type="button" title="直达底部" onclick="btf.scrollToDest(document.body.scrollHeight, 500)"><i class="fas fa-arrow-down"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div class="js-pjax" id="rightMenu"><div class="rightMenu-group rightMenu-small"><a class="rightMenu-item" href="javascript:window.history.back();"><i class="fa fa-arrow-left"></i></a><a class="rightMenu-item" href="javascript:window.history.forward();"><i class="fa fa-arrow-right"></i></a><a class="rightMenu-item" href="javascript:window.location.reload();"><i class="fa fa-refresh"></i></a><a class="rightMenu-item" href="javascript:rmf.scrollToTop();"><i class="fa fa-arrow-up"></i></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-text"><a class="rightMenu-item" href="javascript:rmf.copySelect();"><i class="fa fa-copy"></i><span>复制</span></a><a class="rightMenu-item" href="javascript:window.open(&quot;https://www.baidu.com/s?wd=&quot;+window.getSelection().toString());window.location.reload();"><i class="fa fa-search"></i><span>百度搜索</span></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-too"><a class="rightMenu-item" href="javascript:window.open(window.getSelection().toString());window.location.reload();"><i class="fa fa-link"></i><span>转到链接</span></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-paste"><a class="rightMenu-item" href="javascript:rmf.paste()"><i class="fa fa-copy"></i><span>粘贴</span></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-post"><a class="rightMenu-item" href="#post-comment"><i class="fas fa-comment"></i><span>空降评论</span></a><a class="rightMenu-item" href="javascript:rmf.copyWordsLink()"><i class="fa fa-link"></i><span>复制本文地址</span></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-to"><a class="rightMenu-item" href="javascript:rmf.openWithNewTab()"><i class="fa fa-window-restore"></i><span>新窗口打开</span></a><a class="rightMenu-item" id="menu-too" href="javascript:rmf.open()"><i class="fa fa-link"></i><span>转到链接</span></a><a class="rightMenu-item" href="javascript:rmf.copyLink()"><i class="fa fa-copy"></i><span>复制链接</span></a></div><div class="rightMenu-group rightMenu-line hide" id="menu-img"><a class="rightMenu-item" href="javascript:rmf.saveAs()"><i class="fa fa-download"></i><span>保存图片</span></a><a class="rightMenu-item" href="javascript:rmf.openWithNewTab()"><i class="fa fa-window-restore"></i><span>在新窗口打开</span></a><a class="rightMenu-item" href="javascript:rmf.copyLink()"><i class="fa fa-copy"></i><span>复制图片链接</span></a></div><div class="rightMenu-group rightMenu-line"><a class="rightMenu-item" href="javascript:randomPost()"><i class="fa fa-paper-plane"></i><span>随便逛逛</span></a><a class="rightMenu-item" href="javascript:switchNightMode();"><i class="fa fa-moon"></i><span>昼夜切换</span></a><a class="rightMenu-item" href="/personal/about/"><i class="fa fa-info-circle"></i><span>关于博客</span></a><a class="rightMenu-item" href="javascript:toggleWinbox();"><i class="fas fa-cog"></i><span>美化设置</span></a><a class="rightMenu-item" href="javascript:rmf.fullScreen();"><i class="fas fa-expand"></i><span>切换全屏</span></a><a class="rightMenu-item" href="javascript:window.print();"><i class="fa-solid fa-print"></i><span>打印页面</span></a></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.staticfile.org/fancyapps-ui/4.0.31/fancybox.umd.min.js"></script><script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/instant.page/5.1.0/instantpage.min.js" type="module"></script><script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vanilla-lazyload/17.3.1/lazyload.iife.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdnjs.cloudflare.com/ajax/libs/pangu/4.0.7/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (true){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><script src="/js/search/local-search.js"></script><script async="async">var preloader = {
  endLoading: () => {
    document.body.style.overflow = 'auto';
    document.getElementById('loading-box').classList.add("loaded")
  },
  initLoading: () => {
    document.body.style.overflow = '';
    document.getElementById('loading-box').classList.remove("loaded")

  }
}
window.addEventListener('load',preloader.endLoading())
setTimeout(function(){preloader.endLoading();}, 5000);
document.getElementById('loading-box').addEventListener('click',()=> {preloader.endLoading()})</script><div class="js-pjax"><script>(()=>{
  const init = () => {
    twikoo.init(Object.assign({
      el: '#twikoo-wrap',
      envId: '',
      region: '',
      onCommentLoaded: function () {
        btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
      }
    }, null))
  }

  const getCount = () => {
    const countELement = document.getElementById('twikoo-count')
    if(!countELement) return
    twikoo.getCommentsCount({
      envId: '',
      region: '',
      urls: [window.location.pathname],
      includeReply: false
    }).then(function (res) {
      countELement.innerText = res[0].count
    }).catch(function (err) {
      console.error(err);
    });
  }

  const runFn = () => {
    init()
    
  }

  const loadTwikoo = () => {
    if (typeof twikoo === 'object') {
      setTimeout(runFn,0)
      return
    } 
    getScript('https://cdn.staticfile.org/twikoo/1.6.8/twikoo.all.min.js').then(runFn)
  }

  if ('Twikoo' === 'Twikoo' || !true) {
    if (true) btf.loadComment(document.getElementById('twikoo-wrap'), loadTwikoo)
    else loadTwikoo()
  } else {
    window.loadOtherComment = () => {
      loadTwikoo()
    }
  }
})()</script></div><script src="https://cdn.staticfile.org/jquery/3.6.3/jquery.min.js"></script><script async src="https://cdn1.tianli0.top/npm/vue@2.6.14/dist/vue.min.js"></script><script async src="https://cdn1.tianli0.top/npm/element-ui@2.15.6/lib/index.js"></script><script async src="https://cdn.bootcdn.net/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script><script defer type="text/javascript" src="https://cdn1.tianli0.top/npm/sweetalert2@8.19.0/dist/sweetalert2.all.js"></script><script async src="//npm.elemecdn.com/pace-js@1.2.4/pace.min.js"></script><script defer src="https://cdn1.tianli0.top/gh/nextapps-de/winbox/dist/winbox.bundle.min.js"></script><script async src="//at.alicdn.com/t/c/font_3586335_hsivh70x0fm.js"></script><script async src="//at.alicdn.com/t/c/font_3636804_gr02jmjr3y9.js"></script><script async src="//at.alicdn.com/t/c/font_3612150_kfv55xn3u2g.js"></script><script async src="https://cdn.wpon.cn/2022-sucai/Gold-ingot.js"></script><canvas id="universe"></canvas><canvas id="snow"></canvas><script defer src="/js/fomal.js"></script><link rel="stylesheet" href="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-M/aplayer/1.10.1/APlayer.min.js"></script><script src="https://cdn1.tianli0.top/npm/js-heo@1.0.12/metingjs/Meting.min.js"></script><script src="https://lib.baomitu.com/pjax/0.2.8/pjax.min.js"></script><script>let pjaxSelectors = ["head > title","#config-diff","#body-wrap","#rightside-config-hide","#rightside-config-show","#web_bg",".js-pjax","#bibi","body > title","#app","#tag-echarts","#posts-echart","#categories-echarts"]

var pjax = new Pjax({
  elements: 'a:not([target="_blank"])',
  selectors: pjaxSelectors,
  cacheBust: false,
  analytics: false,
  scrollRestoration: false
})

document.addEventListener('pjax:send', function () {

  // removeEventListener scroll 
  window.tocScrollFn && window.removeEventListener('scroll', window.tocScrollFn)
  window.scrollCollect && window.removeEventListener('scroll', scrollCollect)

  typeof preloader === 'object' && preloader.initLoading()
  document.getElementById('rightside').style.cssText = "opacity: ''; transform: ''"
  
  if (window.aplayers) {
    for (let i = 0; i < window.aplayers.length; i++) {
      if (!window.aplayers[i].options.fixed) {
        window.aplayers[i].destroy()
      }
    }
  }

  typeof typed === 'object' && typed.destroy()

  //reset readmode
  const $bodyClassList = document.body.classList
  $bodyClassList.contains('read-mode') && $bodyClassList.remove('read-mode')

  typeof disqusjs === 'object' && disqusjs.destroy()
})

document.addEventListener('pjax:complete', function () {
  window.refreshFn()

  document.querySelectorAll('script[data-pjax]').forEach(item => {
    const newScript = document.createElement('script')
    const content = item.text || item.textContent || item.innerHTML || ""
    Array.from(item.attributes).forEach(attr => newScript.setAttribute(attr.name, attr.value))
    newScript.appendChild(document.createTextNode(content))
    item.parentNode.replaceChild(newScript, item)
  })

  GLOBAL_CONFIG.islazyload && window.lazyLoadInstance.update()

  typeof chatBtnFn === 'function' && chatBtnFn()
  typeof panguInit === 'function' && panguInit()

  // google analytics
  typeof gtag === 'function' && gtag('config', '', {'page_path': window.location.pathname});

  // baidu analytics
  typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);

  typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()

  // prismjs
  typeof Prism === 'object' && Prism.highlightAll()

  typeof preloader === 'object' && preloader.endLoading()
})

document.addEventListener('pjax:error', (e) => {
  if (e.request.status === 404) {
    pjax.loadUrl('/404.html')
  }
})</script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --> <script data-pjax>if(document.getElementById('recent-posts') && (location.pathname ==='/'|| '/' ==='all')){
    var parent = document.getElementById('recent-posts');
    var child = '<div class="recent-post-item" style="width:100%;height: auto"><div id="catalog_magnet"><div class="magnet_item"><a class="magnet_link" href="https://www.naste.top:1024/categories/Java/"><div class="magnet_link_context" style=""><span style="font-weight:500;flex:1">🍡 XiaoFeiのJava学习笔记 (55)</span><span style="padding:0px 4px;border-radius: 8px;"><i class="fas fa-arrow-circle-right"></i></span></div></a></div><div class="magnet_item"><a class="magnet_link" href="https://www.naste.top:1024/categories/Linux/"><div class="magnet_link_context" style=""><span style="font-weight:500;flex:1">🍼 XiaoFeiのLinux笔记 (33)</span><span style="padding:0px 4px;border-radius: 8px;"><i class="fas fa-arrow-circle-right"></i></span></div></a></div><div class="magnet_item"><a class="magnet_link" href="https://www.naste.top:1024/categories/Python/"><div class="magnet_link_context" style=""><span style="font-weight:500;flex:1">🍉 XiaoFeiのPython笔记 (2)</span><span style="padding:0px 4px;border-radius: 8px;"><i class="fas fa-arrow-circle-right"></i></span></div></a></div><div class="magnet_item"><a class="magnet_link" href="https://www.naste.top:1024/categories/前端/"><div class="magnet_link_context" style=""><span style="font-weight:500;flex:1">🍟 XiaoFeiの前端笔记 (17)</span><span style="padding:0px 4px;border-radius: 8px;"><i class="fas fa-arrow-circle-right"></i></span></div></a></div><div class="magnet_item"><a class="magnet_link" href="https://www.naste.top:1024/categories/Other/"><div class="magnet_link_context" style=""><span style="font-weight:500;flex:1">🍥 XiaoFeiのOther笔记 (10)</span><span style="padding:0px 4px;border-radius: 8px;"><i class="fas fa-arrow-circle-right"></i></span></div></a></div><div class="magnet_item" style="visibility: hidden"></div><a class="magnet_link_more"  href="https://www.naste.top:1024/categories/" style="flex:1;text-align: center;margin-bottom: 10px;">查看更多...</a></div></div>';
    console.log('已挂载magnet')
    parent.insertAdjacentHTML("afterbegin",child)}
     </script><style>#catalog_magnet{flex-wrap: wrap;display: flex;width:100%;justify-content:space-between;padding: 10px 10px 0 10px;align-content: flex-start;}.magnet_item{flex-basis: calc(33.333333333333336% - 5px);background: #e9e9e9;margin-bottom: 10px;border-radius: 8px;transition: all 0.2s ease-in-out;}.magnet_item:hover{background: var(--text-bg-hover)}.magnet_link_more{color:#555}.magnet_link{color:black}.magnet_link:hover{color:white}@media screen and (max-width: 600px) {.magnet_item {flex-basis: 100%;}}.magnet_link_context{display:flex;padding: 10px;font-size:16px;transition: all 0.2s ease-in-out;}.magnet_link_context:hover{padding: 10px 20px;}</style>
    <style></style><script data-pjax>
  function butterfly_swiper_injector_config(){
    var parent_div_git = document.getElementById('recent-posts');
    var item_html = '<div class="recent-post-item" style="height: auto;width: 100%"><div class="blog-slider swiper-container-fade swiper-container-horizontal" id="swiper_container"><div class="blog-slider__wrp swiper-wrapper" style="transition-duration: 0ms;"><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/204253054.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://www.naste.top:9000/webp/1675912191.webp" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-03-08</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/204253054.html&quot;);" href="javascript:void(0);" alt="">SpringBoot使用实现定时任务和xxl-job实现分布式任务调度</a><div class="blog-slider__text">SpringBoot使用实现定时任务和xxl-job实现分布式任务调度</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/204253054.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div><div class="blog-slider__item swiper-slide" style="width: 750px; opacity: 1; transform: translate3d(0px, 0px, 0px); transition-duration: 0ms;"><a class="blog-slider__img" onclick="pjax.loadUrl(&quot;posts/538133837.html&quot;);" href="javascript:void(0);" alt=""><img width="48" height="48" src= "" data-lazy-src="https://www.naste.top:9000/webp/1678672933.webp" alt="" onerror="this.src=https://unpkg.zhimg.com/akilar-candyassets/image/loading.gif; this.onerror = null;"/></a><div class="blog-slider__content"><span class="blog-slider__code">2023-03-15</span><a class="blog-slider__title" onclick="pjax.loadUrl(&quot;posts/538133837.html&quot;);" href="javascript:void(0);" alt="">Hexo中Markdown语法与外挂标签写法汇总</a><div class="blog-slider__text">Hexo中Markdown语法与外挂标签写法汇总</div><a class="blog-slider__button" onclick="pjax.loadUrl(&quot;posts/538133837.html&quot;);" href="javascript:void(0);" alt="">详情       </a></div></div></div><div class="blog-slider__pagination swiper-pagination-clickable swiper-pagination-bullets"></div></div></div>';
    console.log('已挂载butterfly_swiper')
    parent_div_git.insertAdjacentHTML("afterbegin",item_html)
    }
  var elist = 'undefined'.split(',');
  var cpage = location.pathname;
  var epage = '/';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_swiper_injector_config();
  }
  else if (epage === cpage){
    butterfly_swiper_injector_config();
  }
  </script><script defer src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper.min.js"></script><script defer data-pjax src="https://npm.elemecdn.com/hexo-butterfly-swiper/lib/swiper_init.js"></script><div class="js-pjax"><script async="async">var arr = document.getElementsByClassName('recent-post-item');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '2s');
    arr[i].setAttribute('data-wow-delay', '200ms');
    arr[i].setAttribute('data-wow-offset', '30');
    arr[i].setAttribute('data-wow-iteration', '1');
  }</script><script async="async">var arr = document.getElementsByClassName('card-widget');
for(var i = 0;i<arr.length;i++){
    arr[i].classList.add('wow');
    arr[i].classList.add('animate__zoomIn');
    arr[i].setAttribute('data-wow-duration', '2s');
    arr[i].setAttribute('data-wow-delay', '200ms');
    arr[i].setAttribute('data-wow-offset', '30');
    arr[i].setAttribute('data-wow-iteration', '1');
  }</script></div><script defer src="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/wow.min.js"></script><script defer src="https://npm.elemecdn.com/hexo-butterfly-wowjs/lib/wow_init.js"></script><script data-pjax src="https://npm.elemecdn.com/hexo-filter-gitcalendar/lib/gitcalendar.js"></script><script data-pjax>
  function gitcalendar_injector_config(){
      var parent_div_git = document.getElementById('gitZone');
      var item_html = '<div class="recent-post-item" id="gitcalendarBar" style="width:100%;height:auto;padding:10px;"><style>#git_container{min-height: 320px}@media screen and (max-width:650px) {#git_container{min-height: 0px}}</style><div id="git_loading" style="width:10%;height:100%;margin:0 auto;display: block;"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 50 50" style="enable-background:new 0 0 50 50" xml:space="preserve"><path fill="#d0d0d0" d="M25.251,6.461c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615V6.461z" transform="rotate(275.098 25 25)"><animatetransform attributeType="xml" attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"></animatetransform></path></svg><style>#git_container{display: none;}</style></div><div id="git_container"></div></div>';
      parent_div_git.insertAdjacentHTML("afterbegin",item_html)
      console.log('已挂载gitcalendar')
      }

    if( document.getElementById('gitZone') && (location.pathname ==='/personal/about/'|| '/personal/about/' ==='all')){
        gitcalendar_injector_config()
        GitCalendarInit("https://gitcalendar.naste.top/api?xiao-i-fei",['#d9e0df', '#c6e0dc', '#a8dcd4', '#9adcd2', '#89ded1', '#77e0d0', '#5fdecb', '#47dcc6', '#39dcc3', '#1fdabe', '#00dab9'],'xiao-i-fei')
    }
  </script><!-- hexo injector body_end end --></body></html>